Project

General

Profile

Actions

Task #54813

closed

BackendConfigurationManager figures out wrong pid

Added by Felix Oertel almost 11 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Start date:
2014-01-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

For backend modules, in Configuration/BackendConfigurationManager.php:getCurrentPageId() we try to find the current pid. If we are in Web->, the id is readable via _GP('id'), everything is fine.

If we are outside Web->, there is no pid. The manager then tries to figure some useful pid out. It first looks for a page markes "is_siteroot" and then a sys_template marked "root". While the treeroot is id 0, the manager will usually use id 1, because this is, where the root template resides.

This causes problems with caching, because the core takes id 0 for "global" scope. For example the caches in "cf_cache_pagesection" are generated (and tagged) for pid 0, if no specific pid is given.

While the method is currently protected and I don't think too much people will have their configurationManager inherited, this still would be a breaking change. It's a bug, so breaking change would be ok, but some people mind find, it's not quiet the right time for that.

If that would be the case, I would propose deprecating this method and introducing a new one to deal with the pid correctly.


Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Bug #55028: Static TS must be available even when there is no page UIDClosed2014-01-15

Actions
Related to TYPO3 Core - Task #54701: Cache global TypoScript template in backendClosedFelix Oertel2014-01-02

Actions
Related to TYPO3 Core - Task #86262: Deprecate FE TypoScript processing in BERejected2018-09-15

Actions
Related to TYPO3 Core - Bug #88572: ConfigurationManager returns wrong configurationAccepted2019-06-17

Actions
Actions #1

Updated by Ernesto Baschny almost 11 years ago

Felix, go ahead and change that, if it's wrong. This is internal and not API, so I doubt that extensions are extending it.

I don't understand what you mean with "While the treeroot is id 0, the manager will usually use id 1, because this is, where the root template resides". Maybe a patch in Gerrit will help us understand how you suggest to solve the problem.

Thanks for working on that!

Actions #2

Updated by Felix Oertel almost 11 years ago

Hey Ernesto,

if we call a backend module outside "Web", it does not have a page selected. The core then assumes the pid "0", for example to look for typoscript templates or to tag the caches (cf_cache_pagesection e.g.).

Extbase instead looks for the first page with "Use as Root Page" set and, if there is none, for the page where the first typoscript template with "Rootlevel" set and takes that pid.

While I understand that intention, I don't think that makes any sense, because if no page is selected, it might be as wrong to take the first root-page / -template as it might to take the last one or any other page.

I would go for the cores approach ... if the pid is set, good, if not, use 0.

Actions #3

Updated by Gerrit Code Review almost 11 years ago

  • Status changed from Accepted 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/26675

Actions #4

Updated by Gerrit Code Review almost 11 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26675

Actions #5

Updated by Anonymous almost 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Marc Bastian Heinrichs almost 11 years ago

  • Status changed from Resolved to On Hold
  • % Done changed from 100 to 0
Actions #8

Updated by Ernesto Baschny almost 11 years ago

+1 on reverting that for now, thanks Ma-Ba for taking over. Let's think about better ways to achieve the desired result first.

Actions #9

Updated by Ernesto Baschny almost 11 years ago

  • Project changed from 534 to TYPO3 Core
  • Category deleted (Extbase: Configuration)
Actions #10

Updated by Ernesto Baschny almost 11 years ago

  • Category set to Extbase
  • Is Regression set to No
  • TYPO3 Version set to 6.2
Actions #11

Updated by Ernesto Baschny almost 11 years ago

  • Parent task set to #55079
Actions #12

Updated by Alexander Opitz over 9 years ago

  • Status changed from On Hold to New
  • Target version changed from 6.2.0 to 7 LTS

Remove OnHold and retarget for 7 ... it's to late for 6.2 (if it is breaking).

Actions #13

Updated by Benni Mack about 9 years ago

  • Target version changed from 7 LTS to 8 LTS
Actions #14

Updated by Benni Mack over 7 years ago

  • Target version changed from 8 LTS to Candidate for patchlevel
Actions #15

Updated by Susanne Moog about 7 years ago

  • Blocks deleted (Task #54701: Cache global TypoScript template in backend)
Actions #16

Updated by Susanne Moog about 7 years ago

  • Related to Task #54701: Cache global TypoScript template in backend added
Actions #17

Updated by Benni Mack about 7 years ago

  • Assignee deleted (Felix Oertel)
  • Target version changed from Candidate for patchlevel to Candidate for Major Version
  • Parent task deleted (#55079)
Actions #18

Updated by Christian Kuhn about 6 years ago

  • Related to Task #86262: Deprecate FE TypoScript processing in BE added
Actions #19

Updated by Gerrit Code Review about 6 years ago

  • Status changed from New 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/58284

Actions #20

Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #21

Updated by Gerrit Code Review about 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #22

Updated by Gerrit Code Review about 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #23

Updated by Gerrit Code Review about 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #24

Updated by Gerrit Code Review about 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #25

Updated by Gerrit Code Review about 6 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #26

Updated by Gerrit Code Review about 6 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #27

Updated by Gerrit Code Review about 6 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #28

Updated by Gerrit Code Review about 6 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #29

Updated by Gerrit Code Review about 6 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #30

Updated by Gerrit Code Review about 6 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #31

Updated by Gerrit Code Review about 6 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #32

Updated by Gerrit Code Review about 6 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #33

Updated by Gerrit Code Review about 6 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #34

Updated by Gerrit Code Review about 6 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #35

Updated by Gerrit Code Review about 6 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58284

Actions #36

Updated by Christian Kuhn about 6 years ago

  • Status changed from Under Review to New
Actions #37

Updated by Georg Ringer over 4 years ago

  • Status changed from New to Resolved

resolved with #88572

Actions #38

Updated by Georg Ringer over 4 years ago

  • Related to Bug #88572: ConfigurationManager returns wrong configuration added
Actions #39

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF