From 4d54985d0a52a3465b6146fc29c6dbfd701db6f5 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 1 Feb 2023 17:36:28 +0200 Subject: [PATCH 1/2] fetch only news which status is 1 --- .../src/Plugin/ExternalEntities/StorageClient/News.php | 1 + 1 file changed, 1 insertion(+) diff --git a/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php b/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php index 8cb57d5ec..830e3380e 100644 --- a/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php +++ b/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php @@ -156,6 +156,7 @@ public function query( 'fields[node--news_item]' => 'id', // No need to fetch non-published entities. 'fields[status]' => 1, + 'filter[status][value]' => 1 ]; if ($start) { From 7888f9817963f5cf0faa851f6726ccd30582e654 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 1 Feb 2023 17:37:19 +0200 Subject: [PATCH 2/2] added missing comma --- .../src/Plugin/ExternalEntities/StorageClient/News.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php b/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php index 830e3380e..051e3e482 100644 --- a/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php +++ b/helfi_features/helfi_news_feed/src/Plugin/ExternalEntities/StorageClient/News.php @@ -156,7 +156,7 @@ public function query( 'fields[node--news_item]' => 'id', // No need to fetch non-published entities. 'fields[status]' => 1, - 'filter[status][value]' => 1 + 'filter[status][value]' => 1, ]; if ($start) {