From cf091d11640b0aaff4bcb3a9b9a43a359a1b5ff9 Mon Sep 17 00:00:00 2001 From: sandip27 Date: Fri, 22 Dec 2023 16:10:17 +0530 Subject: [PATCH] Issue #3410483 by sandip27: Fixed issue for Empty Search Results listing. --- custom_search.pages.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_search.pages.inc b/custom_search.pages.inc index fbc0fcc..743971e 100644 --- a/custom_search.pages.inc +++ b/custom_search.pages.inc @@ -29,7 +29,7 @@ function custom_search_preprocess_item_list__search_results(&$variables) { $types = []; foreach ($variables['items'] as $key => $item) { // Render results. - $variables['items'][$key]['value'] = \Drupal::service('renderer')->render($item['value']); + $variables['items'][$key]['value'] = \Drupal::service('renderer')->render($item['#result']); // Count results for the filter. if ($page_config && $page_config['filter']['position'] != 'disabled') { $bundle = $item['value']['#result']['node']->bundle(); -- 2.42.1