Issue Bug Closed

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

Alexander Vogt 06/04/19, 14:40 updated 11/06/26, 10:39

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).

Reviews 1

History 810

  1. Gerrit Code Review pushed patch set 1 for master to change 62883 status New Under Review <span data-processor="relativetime" data-value="2020-01-14T20:15:15+00:00" > 01/14/20, 20:15 </span>

  2. David Hedden commented <span data-processor="relativetime" data-value="2021-02-23T13:08:33+00:00" > 02/23/21, 13:08 </span>

    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

  3. Sruthi Kumar G commented <span data-processor="relativetime" data-value="2022-06-13T13:25:09+00:00" > 06/13/22, 13:25 </span>

    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.

  4. Benni Mack commented and changed status Accepted Closed <span data-processor="relativetime" data-value="2026-11-06T10:39:01+00:00" > 11/06/26, 10:39 </span>

    Cannot reproduce this on current main. The frontend page resolution was rewritten (PageInformationFactory): content_from_pid no longer clones TSFE, it only validates the target page, and the language aspect including the fallback chain is set once for the requested page. With a strict language falling back to another language, menus and content of a page using “Show content from page” render correctly. Note that content_from_pid is a per-translation field, so it needs to be set on the translated page record as well. Closing — please reopen with a reproducible setup if it still occurs on 13.4/14.x.