Project

General

Profile

Actions

Bug #101187

closed

Free mode link generation is broken in non-default languages

Added by Michael Binder 10 months ago. Updated 10 months ago.

Status:
Resolved
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 modeResolved2023-06-23

Actions
Actions #1

Updated by Michael Binder 10 months ago

  • Related to Bug #101157: Canonical tag incorrect in free mode added
Actions #2

Updated by Michael Binder 10 months ago

  • Subject changed from Free Mode Link generation is broken to Free mode link generation is broken in non-default languages
Actions #3

Updated by Gerrit Code Review 10 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79586

Actions #4

Updated by Gerrit Code Review 10 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79586

Actions #5

Updated by Gerrit Code Review 10 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79586

Actions #6

Updated by Gerrit Code Review 10 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79586

Actions #7

Updated by Gerrit Code Review 10 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79986

Actions #8

Updated by Benni Mack 10 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF