Project

General

Profile

Actions

Bug #88486

open

Language fallback chain is lost with setting "Show Content from Page"

Added by Alexander Vogt almost 5 years ago. Updated 9 months ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-06-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

To reproduce:

Languages:
  • /de/ (Default)
  • /en/
  • /en-us/ (Fallback Type "strict", Fallback to other Languages: "EN")
Pages (All pages translated to "EN", Language Setting "Show page even if no translation exists" active):
  • Root
    • Page 1 [/page-1/, uid: 1, content_from_pid: 2]
    • Page 2 [/page-2/, uid: 2]

Frontend:
/en-us/page-1 -> Missing language fallback chain in LanguageAspect. As a result, the navigation is no longer displayed
/en-us/page-2 -> Works. The navigation in language EN is displayed.

https://github.com/TYPO3/TYPO3.CMS/blob/v9.5.7/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php#L1693
At this point the LanguageAspect will be ovewritten with a new LanguageAspect without fallback chain.

This modified LanguageAspect is used for menu generation (https://github.com/TYPO3/TYPO3.CMS/blob/v9.5.7/typo3/sysext/frontend/Classes/Page/PageRepository.php#L634).

Actions #1

Updated by Susanne Moog over 4 years ago

  • Sprint Focus set to On Location Sprint
Actions #2

Updated by Gerrit Code Review over 4 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/c/Packages/TYPO3.CMS/+/62883

Actions #3

Updated by Gerrit Code Review almost 4 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/c/Packages/TYPO3.CMS/+/62883

Actions #4

Updated by Benni Mack over 3 years ago

  • Status changed from Under Review to Accepted
Actions #5

Updated by David Hedden about 3 years ago

I think the main problem is that the TSFE gets copied, but the referenced classes are still the same.
So after the call to getPageAndRootlineWithDomain that changes the context, it also gets changed for the original TSFE.

An easy fix would be to get the context before creating the copy and restoring it, after that only the contentId from the language aspect has to be inserted.
But that still leaves room for future bugs from copying the TSFE.

https://github.com/TYPO3/TYPO3.CMS/blob/298c3d4c400702c893bbe58503635cd2d905e340/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php#L3483

Actions #6

Updated by Sruthi Kumar G almost 2 years ago

This issue still exists in v11.5.10 as well.
The default language is DE, on FR translation added content_from_pid as EN translated page.
In FR page frontend, EN content is shown but navigation is missing.

Actions #7

Updated by Oliver Hader over 1 year ago

  • Sprint Focus deleted (On Location Sprint)
Actions #8

Updated by Benni Mack 9 months ago

  • Sprint Focus set to On Location Sprint
Actions

Also available in: Atom PDF