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

Files 2

History 49

  1. Michael Binder changed Related to #101157 06/28/23, 13:43

  2. Michael Binder changed subject Free Mode Link generation is broken Free mode link generation is broken in non-default languages 06/28/23, 13:49

  3. Gerrit Code Review pushed patch set 1 for main to change 79586 status New Under Review 07/03/23, 10:42

  4. Gerrit Code Review pushed patch set 2 for main to change 79586 07/06/23, 20:26

  5. Gerrit Code Review pushed patch set 3 for main to change 79586 07/07/23, 08:05

  6. Gerrit Code Review pushed patch set 4 for main to change 79586 07/07/23, 08:25

  7. Gerrit Code Review pushed patch set 1 for 12.4 to change 79986 07/13/23, 07:50

  8. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % 07/13/23, 08:35

    Applied in changeset commit:201e80150ee729512acf37a6c0b0d53320458381.

  9. Benni Mack changed status Resolved Closed 07/09/24, 14:15