Project

General

Profile

Actions

Bug #79354

closed

PageRepository::getPage fails in Backend context

Added by Timo Hund almost 8 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2017-01-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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?


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #87125: FrontendGroupRestriction class explode-Error in constructorRejected2018-12-11

Actions
Has duplicate TYPO3 Core - Bug #80917: Backend: Uncaught TYPO3 Exception in FrontendGroupRestriction constructor if $GLOBALS['TSFE']->gr_list is nullClosed2017-04-20

Actions
Actions #1

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.

Actions #2

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

Actions #3

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
Actions #4

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

Actions #5

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.“

Actions #6

Updated by cosmoblonde GmbH almost 6 years ago

  • Related to Bug #87125: FrontendGroupRestriction class explode-Error in constructor added
Actions

Also available in: Atom PDF