From 6cfca1f259230b987607709c18ad3b25b12b31ca Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 17 May 2019 17:05:15 +0200 Subject: [PATCH] Respect cycler pages during indexing This was done by TYPO3 itself before Version 9. Since version 9, we have to take care ourselves. --- Classes/Domain/Index/TcaIndexer/TcaTableService.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Classes/Domain/Index/TcaIndexer/TcaTableService.php b/Classes/Domain/Index/TcaIndexer/TcaTableService.php index 1330e22..4c029a9 100644 --- a/Classes/Domain/Index/TcaIndexer/TcaTableService.php +++ b/Classes/Domain/Index/TcaIndexer/TcaTableService.php @@ -31,6 +31,7 @@ use TYPO3\CMS\Core\Database\Query\QueryBuilder; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\RootlineUtility; use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; +use TYPO3\CMS\Frontend\Page\PageRepository; /** * Encapsulate logik related to TCA configuration. @@ -324,6 +325,18 @@ class TcaTableService implements TcaTableServiceInterface return true; } + if ($pageInRootLine['doktype'] === PageRepository::DOKTYPE_RECYCLER) { + $this->logger->info( + sprintf( + 'Record %u is black listed due to being within recycler page %u.', + $record['uid'], + $pageInRootLine['uid'] + ), + [$record, $pageInRootLine] + ); + return true; + } + if ($pageInRootLine['extendToSubpages'] && ( ($pageInRootLine['endtime'] > 0 && $pageInRootLine['endtime'] <= time()) || ($pageInRootLine['starttime'] > 0 && $pageInRootLine['starttime'] >= time())