Project

General

Profile

Actions

Bug #93251

open

getCurrentPageId not working correctly in multisite systems

Added by Sven Wappler almost 4 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2021-01-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The \TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager getCurrentPageId() function may not work correctly in MultiSite systems because the functions it contains do not work in a MultiSite environment.

  • $this->getCurrentPageIdFromGetPostData()
    Often the id GET/POST parameter is missing, for example at editing a content record. A separate pid parameter could be introduced because the id parameter is too universal.
    Or even better, to prevent manipulation: When retrieving the record data, the pid would have to be written to an environment variable.
  • $this->getCurrentPageIdFromCurrentSiteRoot()
    This function cannot work correctly because it chooses a random root page. This can lead to TypoScript values being read from another site. Possibly a security issue. To be able to choose the correct root page, it would also have to know the current page ID. And then it would be superfluous, because the page ID would be already known.
  • $this->getCurrentPageIdFromRootTemplate()
    The same as getCurrentPageIdFromCurrentSiteRoot(). Cannot work correctly.
  • constant self::DEFAULT_BACKEND_STORAGE_PID
    Is only read, but never set.

Related issues 3 (1 open2 closed)

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

Actions
Related to TYPO3 Core - Feature #90429: ConfigurationManager should offer a way to define the site it is fetching a configuration forClosed2020-02-19

Actions
Related to TYPO3 Core - Bug #102380: Resolve correct page UID in BackendConfigurationManagerClosed2023-11-16

Actions
Actions

Also available in: Atom PDF