Bug #28857
closedBackendConfigurationManager wrong implementation of getCurrentPageId
0%
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
Updated by Michael McManus about 13 years ago
- Category set to Extbase: Configuration
Updated by Gerrit Code Review almost 13 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7154
Updated by Gerrit Code Review almost 13 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7154
Updated by Gerrit Code Review almost 13 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7154
Updated by Gerrit Code Review almost 13 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7154
Updated by Gerrit Code Review almost 13 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7154
Updated by Claus Due over 12 years ago
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.
Updated by Gerrit Code Review over 12 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7154
Updated by Gerrit Code Review about 12 years ago
Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7154
Updated by Alexander Schnitzler almost 12 years ago
- Target version set to Extbase 6.1
Updated by Alexander Schnitzler over 11 years ago
- Target version changed from Extbase 6.1 to Extbase 6.2
Updated by Anja Leichsenring over 11 years ago
- Target version changed from Extbase 6.2 to Extbase 6.3
Updated by Anja Leichsenring over 11 years ago
- Target version changed from Extbase 6.3 to Extbase 6.2
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21185
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21185
Updated by Alexander Schnitzler over 11 years ago
- Status changed from Under Review to Needs Feedback
Patch has been abandonded, so we have to think about this one again.
Updated by Alexander Opitz about 10 years ago
- 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
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 7.0 to 7.1 (Cleanup)
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Bernhard Kraft over 8 years ago
- TYPO3 Version changed from 4.5 to 8
Wouldn't it be a start to allow setting the PID to use (currentPageId) from within TS-Config.
I encountered this issue for an extbase backend action which gets rendered in a TCEform (FormEngine). There is no "&id" parameter but only the ID of the content-element/record to get edited gets passed along. But all those records are stored on a sys folder so in my case a static TS-Config setting would suffice.
Or at least provide a hook/signal at the given code location (getCurrentPageId) so one can put custom code into place.
https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php#l132