From c7a428b454c69e1020d3d22e17634b3d4bd3d265 Mon Sep 17 00:00:00 2001 From: medarob <33951787+medarob@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:12:43 +0100 Subject: [PATCH 1/2] Update Page.php TYPO3 11.5.36 ke_search 5.2.1 PHP 8.2.15 Manually starting the Indexer failed in the BE. Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1476107295: PHP Warning: Undefined array key "alternative" in /var/www/typo3/public/typo3conf/ext/ke_search/Classes/Indexer/Types/Page.php line 1189 | TYPO3\CMS\Core\Error\Exception thrown in file /var/www/typo3/public/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 137. Requested URL: https://my.domain.tld/typo3/module/web/KeSearchBackendModule?token=--AnonymizedToken--&id=217&do=startindexer This change resolved the issue. --- Classes/Indexer/Types/Page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Indexer/Types/Page.php b/Classes/Indexer/Types/Page.php index 140e08b1b..5a61b6536 100644 --- a/Classes/Indexer/Types/Page.php +++ b/Classes/Indexer/Types/Page.php @@ -1186,7 +1186,7 @@ public function storeFileContentToIndex($fileObject, $content, $fileIndexerObjec $content = $metadata['description'] . "\n" . $content; } - if ($metadata['alternative']) { + if ($metadata['alternative'] ?? null) { $content .= "\n" . $metadata['alternative']; } From 2ca18effa6f8e6de6b91e855368ec8dd9f5dd5df Mon Sep 17 00:00:00 2001 From: medarob <33951787+medarob@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:41:54 +0100 Subject: [PATCH 2/2] Update Page.php --- Classes/Indexer/Types/Page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Indexer/Types/Page.php b/Classes/Indexer/Types/Page.php index 5a61b6536..e0280ebf7 100644 --- a/Classes/Indexer/Types/Page.php +++ b/Classes/Indexer/Types/Page.php @@ -1181,7 +1181,7 @@ public function storeFileContentToIndex($fileObject, $content, $fileIndexerObjec } $abstract = ''; - if ($metadata['description']) { + if ($metadata['description'] ?? null) { $abstract = $metadata['description']; $content = $metadata['description'] . "\n" . $content; }