[BUGFIX] Use correct language in l18n_cfg checks 67/58267/8
authorDaniel Goerz <daniel.goerz@posteo.de>
Thu, 13 Sep 2018 13:12:25 +0000 (15:12 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 13 Sep 2018 20:00:47 +0000 (22:00 +0200)
commita9c4253212bd7200a34981e8a42ff7ea02bab227
tree64020e20241c2f8554a7ecb25e21b5abd3f3de23
parent650705368fc1e64aaacc0a7d46f3945999d02107
[BUGFIX] Use correct language in l18n_cfg checks

The check for pages.l18n_cfg is wrong now, as this is
always done against pages.sys_language_uid=0 records (as
"resolvePage" is called right before).

So, these if-statements have to go further south.

On top, the getPageOverlay call needs to be done - on top.

resolvePage -> get default language of page
getPageOverlay -> put the wanted translation on top

A fix for pages.alias has to be in place, as DataHandler
cannot handle pages.alias yet.

Resolves: #86242
Releases: master
Change-Id: Ief99e5f934f6e9d31973b9543cb9a6e599d2d33c
Reviewed-on: https://review.typo3.org/58267
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/PlainScenario.yaml
typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/SlugScenario.yaml
typo3/sysext/frontend/Tests/Functional/SiteHandling/LinkGeneratorTest.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugLinkGeneratorTest.php