#28857BackendConfigurationManager wrong implementation of getCurrentPageId
Description
the current implementation is wrong
// get current site root
$rootPages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 'deleted=0 AND hidden=0 AND is_siteroot=1', '', '', '1');
if (count($rootPages) > 0) {
return $rootPages[0]['uid'];
}
// get root template
$rootTemplates = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('pid', 'sys_template', 'deleted=0 AND hidden=0 AND root=1', '', '', '1');
if (count($rootTemplates) > 0) {
return $rootTemplates[0]['pid'];
}
it just takes the 1st page with is_siteroot or with a template (with root=1).
this won’t work when having more than one tree which is quite common when using TYPO3
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.