Actions
Bug #92369
closedPageRepository "getPage" excludes system folders
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2020-09-22
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
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
Actions