Bug #105907
openWrong order of selection of language fallbacks in link generation (mutiple IDs in the language chain)
0%
Description
Hey everyone,
I found out, that the PageRepository select the wrong overlays in case of multiple fallbacks in the site language configuration (in link building process). I reproduce this with a TYPO3 v12.
Example : There is one language (ID: 19) with the configuration of fallbacks. The value of the fallback in the site configuration is '915,900' (incl. fallbackType = fallback). If the language "19" is rendered a page, that do not exist in language "19", the PageRepository handle the overlay mechanism wrong. `PageRepository->getPageOverlaysForLanguage` add the current rendered language in front of the list of selected UIDs and the checked list is `19, 900, 915` in my case (The current rendered language is first, but the language fallback chain is reversed?!?!).
As Result: In the following lines the pages are selected and become "candidates". The priority is based on the order, so the wrong page language "900" is returned and not the language record of 915 that is configured first in the site configuration fallback chain.
In my case, I saw the problem only in the link generation, because the slugs of the links come from the wrong language (the content is the right one, only links are wrong).
Here is the line which change of the order of the fallback chain: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php#L381 (introduced in this commit: https://github.com/TYPO3/typo3/commit/b00bc4bd822adb037c6a57726d96acd99153bab8)
Why the chain is reversed in case of LanguageAspect::OVERLAYS_MIXED mode? Does anybody else have the problem, if there are more than one language in the fallbackChain?
Regards,
Tim
No data to display