Bug #28857
closed
BackendConfigurationManager wrong implementation of getCurrentPageId
Added by Georg Ringer over 12 years ago.
Updated about 4 years ago.
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
- Category set to Extbase: Configuration
- Status changed from New to Under Review
Note: this is only a problem if the current PID cannot be detected, which usually happens when editing or rendering a cObj of some kind (for BE modules, extension devs will have to take care to pass GET['id'] to each BE view that uses TS, if the dev wants to support sites which use multiple root TS templates).
The coming patch solves the issue by taking the cObj's PID if a cObj is available and no ID was defined in GET.
- Target version set to Extbase 6.1
- Target version changed from Extbase 6.1 to Extbase 6.2
- Target version changed from Extbase 6.2 to Extbase 6.3
- Target version changed from Extbase 6.3 to Extbase 6.2
- Status changed from Under Review to Needs Feedback
Patch has been abandonded, so we have to think about this one again.
- Project changed from 534 to TYPO3 Core
- Category changed from Extbase: Configuration to Extbase
- Status changed from Needs Feedback to New
- Target version changed from Extbase 6.2 to 7.0
- TYPO3 Version set to 4.5
- Is Regression set to No
- Target version changed from 7.0 to 7.1 (Cleanup)
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
- Target version changed from 7.4 (Backend) to 7.5
- Target version deleted (
7.5)
- TYPO3 Version changed from 4.5 to 8
- Status changed from New to Closed
Also available in: Atom
PDF