Actions
Bug #31839
closedError in tslib_fe->checkPageGroupAccess with realurl if page is not found
Status:
Closed
Priority:
Must have
Assignee:
Category:
Content Rendering
Target version:
Start date:
2011-11-16
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:
Description
If you are using the realURL extension and realURL can't determine the requested page path, the method tslib_fe::pageNotFoundAndExit will be called.
Some function-calls later the method checkPageGroupAccess is called, and PHP will crash in line 1188 with this error:
PHP Fatal error: Call to a member function getRootLine() on a non-object in typo3/sysext/cms/tslib/class.tslib_fe.php on line 1188
This happens because the object "$this->sys_page" is not set in the current tslib_fe instance (is only an empty string), it will be only created if the method "fetch_the_id" was called. But if realURL starts the 404-Error Handling "fetch_the_id" will be never called. So you must check if the object is available:
Code before patching:
// If the actual page has no fe_group, check the rootline for // inherited fe_group due to extendToSubpage-property if (intval($row['fe_group']) === 0) {
Code after patching:
// If the actual page has no fe_group, check the rootline for // inherited fe_group due to extendToSubpage-property if (intval($row['fe_group']) === 0 && $this->sys_page) {
Here is a backtrace:
typo3/sysext/cms/tslib/class.tslib_fe.php - tslib_fe->checkPageGroupAccess (1270) typo3/sysext/cms/tslib/class.tslib_fe.php - tslib_fe->getPageAccessFailureReasons (1455) typo3/sysext/cms/tslib/class.tslib_fe.php - tslib_fe->pageErrorHandler (1421) typo3/sysext/cms/tslib/class.tslib_fe.php - tslib_fe->pageNotFoundHandler (1379) typo3conf/ext/realurl/class.tx_realurl.php - tslib_fe->pageNotFoundAndExit (1676) typo3conf/ext/realurl/class.tx_realurl.php - tx_realurl->decodeSpURL_throw404 (1368) typo3conf/ext/realurl/class.tx_realurl.php - tx_realurl->decodeSpURL_settingPostVarSets (1176) typo3conf/ext/realurl/class.tx_realurl.php - tx_realurl->decodeSpURL_doDecode (1021) - tx_realurl->decodeSpURL () t3lib/class.t3lib_div.php - ->call_user_func_array (4738) typo3/sysext/cms/tslib/class.tslib_fe.php - t3lib_div->callUserFunction (563) typo3/sysext/cms/tslib/index_ts.php - tslib_fe->checkAlternativeIdMethods (277) index.php - ->require (78)
Actions