Bug #79354
closedPageRepository::getPage fails in Backend context
0%
Description
The call of PageRepository::getPage currently fails in the backend context with the following error:
Uncaught TYPO3 Exception
explode() expects parameter 2 to be string, null given
TypeError thrown in file
/var/www/dev-master.local.typo3.org/typo3_src/typo3/sysext/core/Classes/Database/Query/Restriction/FrontendGroupRestriction.php in line 36.
This happens because FrontendGroupRestriction tries to read TSFE->gr_list. In TYPO3 7.6. is worked to call PageRepository::getPage in the backend context.
Is this a bug, or should a page be fetched in a different way?
Updated by Georg Ringer almost 8 years ago
- Status changed from New to Needs Feedback
why not initializing this setting? PageRepository is meant for the frontend so it expects certain things.
Updated by Marc Hirdes over 7 years ago
Hi. It would be great if it is possible to use getPages and getPagesOverlay also in backend context again. Maybe in sysext/core/Classes/Database/Query/Restriction/FrontendGroupRestriction.php the construct function add an if statement like
if (TYPO3_MODE == 'FE') { $this->frontendGroupIds = $frontendGroupIds === null ? explode(',', $GLOBALS['TSFE']->gr_list) : $frontendGroupIds; }
Kind Regards
Updated by Wouter Wolters over 7 years ago
- Has duplicate Bug #80917: Backend: Uncaught TYPO3 Exception in FrontendGroupRestriction constructor if $GLOBALS['TSFE']->gr_list is null added
Updated by Gerrit Code Review over 7 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53668
Updated by Wolfgang Klinger over 7 years ago
- Status changed from Under Review to Rejected
Wouter Wolters:
„https://review.typo3.org/#/c/49704/ the original change.
The revert https://review.typo3.org/#/c/49719/
So IMO the error must me solved in the code where the restriction is used wrongly.“
Updated by cosmoblonde GmbH almost 6 years ago
- Related to Bug #87125: FrontendGroupRestriction class explode-Error in constructor added