Issue Bug Closed

#93251getCurrentPageId not working correctly in multisite systems

Sven Wappler 01/08/21, 20:31 updated 03/09/25, 19:38

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.