Project

General

Profile

Bug #93343 » 93343.patch

Patch v2 - Andreas Kienast, 2021-01-22 11:38

View differences:

typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
// Get values from site language
$languageAspect = LanguageAspectFactory::createFromSiteLanguage($this->language);
$languageId = $languageAspect->getId();
$languageId = $request->getQueryParams()['L'] ?? $languageAspect->getId();
$languageContentId = $languageAspect->getContentId();
// If sys_language_uid is set to another language than default:
if ($languageAspect->getId() > 0) {
if ($languageId > 0) {
// check whether a shortcut is overwritten by a translated page
// we can only do this now, as this is the place where we get
// to know about translations
$this->checkTranslatedShortcut($languageAspect->getId(), $request);
$this->checkTranslatedShortcut($languageId, $request);
// Request the overlay record for the sys_language_uid:
$olRec = $this->sys_page->getPageOverlay($this->id, $languageAspect->getId());
$olRec = $this->sys_page->getPageOverlay($this->id, $languageId);
if (empty($olRec)) {
// If requested translation is not available:
if (GeneralUtility::hideIfNotTranslated($this->page['l18n_cfg'])) {
(3-3/4)