Project

General

Profile

Actions

Bug #101187

closed

Free mode link generation is broken in non-default languages

Added by Michael Binder over 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-06-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Files

TYPO3_free_mode_patch.patch (1.01 KB) TYPO3_free_mode_patch.patch Michael Binder, 2023-06-28 13:40
free_mode_bug.jpg (286 KB) free_mode_bug.jpg Michael Binder, 2023-06-28 13:41

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #101157: Canonical tag incorrect in free modeClosed2023-06-23

Actions
Actions

Also available in: Atom PDF