diff --git a/ChangeLog b/ChangeLog index 91ff78486..acedc1f40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ Upcoming version [TASK] Add label to "Index Overview" widget (shown since TYPO3 12), and use only one color in the bar chart [TASK] Use ContextualFeedbackSeverity instead of AbstractMessage to set severity [TASK] Register upgrade wizards using attributes +[BUGFIX] Don't index files from hidden file references. Thanks to Kamel Ben Yedder, https://github.com/tpwd/ke_search/issues/206 Version 5.2.0, 8 December 2023 [!!!] The pagebrowser is now rendered in a different way (using the pagination API). If you used a custom template for the pagebrowser you will have to adopt it. Have a look at Resources/Private/Partials/PageBrowser.html diff --git a/Classes/Indexer/Types/Page.php b/Classes/Indexer/Types/Page.php index 0519df23f..140e08b1b 100644 --- a/Classes/Indexer/Types/Page.php +++ b/Classes/Indexer/Types/Page.php @@ -983,8 +983,10 @@ public function indexFiles($fileObjects, $ttContentRow, $feGroupsPages, $tags) $isIndexable = false; if ($fileObject instanceof FileInterface) { $file = ($fileObject instanceof FileReference) ? $fileObject->getOriginalFile() : $fileObject; + $isHiddenFileReference = ($fileObject instanceof FileReference) && $fileObject->getProperty('hidden'); $isIndexable = $file instanceof \TYPO3\CMS\Core\Resource\File - && FileService::isFileIndexable($file, $this->indexerConfig); + && FileService::isFileIndexable($file, $this->indexerConfig) + && !$isHiddenFileReference; } else { $errorMessage = 'Could not index file in content element #' . $ttContentRow['uid'] . ' (no file object).'; $this->pObj->logger->warning($errorMessage);