Issue Bug Closed

#101187Free mode link generation is broken in non-default languages

Michael Binder 06/28/23, 13:43 updated 07/09/24, 14:15

Description

In TYPO3 12LTS with free mode, links to pages via “f:typolink” are no longer formed correctly. The title of the default language is always used.

Example:

<f:link.page pageUid="7" language="0">
 Default Language ID 0
</f:link.page>
<f:link.page pageUid="7" language="1">
 EN Language ID 1
</f:link.page>

Expected:
domain.dev/slug-default-language
domain.dev/en/slug-en-language

*Reality:*
domain.dev/slug-default-language
domain.dev/en/slug-default-language

In TYPO3 v11 this works as expected.

I think the problem is in “vendor/typo3/cms-core/Classes/Domain/Repository/PageRepository.php”, in the getLanguageOverlay function.
It checks if an overlay should be done. But there is no check and no overlay for “free mode”.

I have created an overlay for free mode, but it seems a bit hacky. As language changes can always have a big impact, I have not put the whole thing into an official patch yet, but just attached it here so that someone who knows a lot more about languages can test it.

Reviews 2