Respect cycler pages during indexing

This was done by TYPO3 itself before Version 9. Since version 9, we have
to take care ourselves.
This commit is contained in:
Daniel Siepmann 2019-05-17 17:05:15 +02:00
parent c4e28211af
commit 6cfca1f259
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -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())