From 9c6b8ac53105133caf60951154f1507aaa4cb762 Mon Sep 17 00:00:00 2001 From: Georg Ringer Date: Fri, 15 Nov 2024 09:35:54 +0100 Subject: [PATCH] [BUGFIX] Make the improved search actually work --- .../Listener/ModifyResultItemInLiveSearchEventListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Event/Listener/ModifyResultItemInLiveSearchEventListener.php b/Classes/Event/Listener/ModifyResultItemInLiveSearchEventListener.php index 6d43094b7..8d68676ff 100644 --- a/Classes/Event/Listener/ModifyResultItemInLiveSearchEventListener.php +++ b/Classes/Event/Listener/ModifyResultItemInLiveSearchEventListener.php @@ -54,7 +54,7 @@ public function __invoke(ModifyResultItemInLiveSearchEvent $event): void } $table = $resultItem->getExtraData()['table'] ?? ''; - if (!$table) { + if ($table !== 'tx_news_domain_model_news') { return; } @@ -71,7 +71,7 @@ public function __invoke(ModifyResultItemInLiveSearchEvent $event): void protected function addFieldsToResult(ResultItem $resultItem, array $row): void { foreach ($this->configuration as $fieldName => $field) { - if (isset($GLOBALS['TCA']['tx_news_domain_model_news']['columns'][$fieldName])) { + if (!isset($GLOBALS['TCA']['tx_news_domain_model_news']['columns'][$fieldName])) { continue; } $fieldValue = $row[$fieldName] ?? null;