[BUGFIX] Fix fallback language handling 76/59676/36
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sat, 9 Feb 2019 17:20:56 +0000 (18:20 +0100)
committerBenni Mack <benni@typo3.org>
Mon, 4 Mar 2019 15:25:39 +0000 (16:25 +0100)
commit8d61bef0865649bbe3d73bdf77a47c760c8d9ba4
tree144f9c1a9f737de6d3049318ff40ee76b72b0f8a
parentd9ceaf621e26c99006272853ae73a2b20a973572
[BUGFIX] Fix fallback language handling

This commit solves some issues regarding language fallback handling:

- Resolve correct page for a localized variant respecting fallbacks
  The Page Router now respects the configured language fallback chain
  and tries to find a matching page candidate per language.

- Metadata of page (e.g. page title)
  TSFE now respects the reconfigured language content id in case the
  language fallback is active and resolves the correct data.

- Respect existing localizations in menu rendering
  PageRepository, used by the menu, now respects the language fallback
  chain and finds suitable localized pages.
  However, this does not resolve all issues with shortcut pages.

Resolves: #81657
Resolves: #86595
Resolves: #19114
Releases: master, 9.5
Change-Id: Ic2b302989449ec14e7e6b5c54819870770655da9
Reviewed-on: https://review.typo3.org/c/59676
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Ralf Merz <mail@merzilla.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Ralf Merz <mail@merzilla.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
19 files changed:
typo3/sysext/core/Classes/Routing/PageRouter.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Tests/Functional/Rendering/LocalizedContentRenderingTest.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/AbstractLocalizedPagesTestCase.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/Fixtures/ScenarioA.yaml [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/Fixtures/ScenarioB.yaml [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/Fixtures/ScenarioC.yaml [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/Fixtures/ScenarioD.yaml [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/Fixtures/ScenarioE.yaml [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/Fixtures/ScenarioF.yaml [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/ScenarioATest.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/ScenarioBTest.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/ScenarioCTest.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/ScenarioDTest.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/ScenarioETest.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/SiteHandling/LocalizedPageRendering/ScenarioFTest.php [new file with mode: 0644]