Commit da0e0152 authored by Benni Mack's avatar Benni Mack Committed by Benjamin Franzke
Browse files

[TASK] Avoid additional checks in TSFE when resolving a page

When TSFE is fetching the $page record from PageRepository,
it checks the $TSFE->id parameter, which was originally
the GET parameter. In TYPO3 v9, when "pages_language_overlay"
was merged into "pages", an intermediate step was added
to access translated pages via the GET parameter as well.

This concept however was never needed, as the page ID of the
default language was always resolved with Site Handling
already in the PageRouter.

The double-check in TSFE can be removed, as site handling has
taken over since TYPO3 v10, and was never accessed since
its introduction in TYPO3 v9 (mainly because
the code was added with the migration of "pages_language_overlay"
into "pages" into TYPO3 v9.0, whereas site handling was only added
in TYPO3 v9.2+).

Resolves: #97533
Releases: main
Change-Id: I290200f90b4d23589a4f7aec33a0516ecfab7739

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Tested-by: Benjamin Franzke's avatarBenjamin Franzke <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Benjamin Franzke's avatarBenjamin Franzke <>
parent 24c5608c
......@@ -738,7 +738,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
protected function getPageAndRootline(ServerRequestInterface $request)
$requestedPageRowWithoutGroupCheck = [];
$this->page = $this->sys_page->getPage($this->id);
if (empty($this->page)) {
// If no page, we try to find the page above in the rootLine.
// Page is 'not found' in case the id itself was not an accessible page. code 1
......@@ -902,25 +902,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface
* If $this->id contains a translated page record, this needs to be resolved to the default language
* in order for all rootline functionality and access restrictions to be in place further on.
* Additionally, if a translated page is found, LanguageAspect is set as well.
protected function resolveTranslatedPageId()
$this->page = $this->sys_page->getPage($this->id);
// Accessed a default language page record, nothing to resolve
if (empty($this->page) || (int)$this->page[$GLOBALS['TCA']['pages']['ctrl']['languageField']] === 0) {
$languageId = (int)$this->page[$GLOBALS['TCA']['pages']['ctrl']['languageField']];
$this->page = $this->sys_page->getPage($this->page[$GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField']]);
$this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, $languageId));
$this->id = (int)$this->page['uid'];
* Checks if visibility of the page is blocked upwards in the root line.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment