Bug #101187
closedFree mode link generation is broken in non-default languages
100%
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
Updated by Michael Binder over 1 year ago
- Related to Bug #101157: Canonical tag incorrect in free mode added
Updated by Michael Binder over 1 year ago
- Subject changed from Free Mode Link generation is broken to Free mode link generation is broken in non-default languages
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Benni Mack over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 201e80150ee729512acf37a6c0b0d53320458381.