#92369PageRepository "getPage" excludes system folders
Description
(Please excuse if any of this is filled out wrong – I’m a bug tracker n00b)
As of v9.5, the “getPage” method excludes system folders because of this line (https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/frontend/Classes/Page/PageRepository.php#L275).
$expressionBuilder->lt('pages.doktype', 200)
which equates to
(`pages`.`doktype` < 200)
The sys folder ID is 254.
I appreciate the reasoning behind this, as you don’t typically want to give access, however we rely on this function inside of one of our Scheduler tasks, which uses System folders to hold records (via the TSFE fetch_the_id method.
I have temporarily patched this locally by doing the following (but understand this isn’t the best way of fixing it).
$expressionBuilder->orX(
$expressionBuilder->lt('pages.doktype', 200),
$expressionBuilder->eq('pages.doktype', DOKTYPE_SYSFOLDER)
)
This was discovered upgrading from 8.7 to 9.5
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.