[BUGFIX] Respect '_language' argument for typoLink and LinkHandler
This patch fixes a bug where a t3 page URI with _language != 0 was resolved to a page in the default language. This caused automatically generated redirects to translated pages to redirect to the page in the default language. We now use the same override handling for the '_language' parameter (as already existed for 'L') when t3 page URIs are resolved. Also, we ensure that both parameters are always removed when the final URL is generated. Furthermore, this patch adds tests to cover these cases. Using the historical 'L' parameter still works and has been added to be handled as language override. Background information: The '_language parameter' is the preferred parameter to be used to specify the language in a t3 URI, not 'L'. The behaviour of creating auto redirects on slug changes was changed previously: The target was added as LinkHandler URI (instead of the path). Along with this change, the '_language' parameter was used to ensur...
Showing
- typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php 12 additions, 3 deletionstypo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
- typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/TypoLinkScenario.yaml 12 additions, 0 deletions...ts/Functional/SiteHandling/Fixtures/TypoLinkScenario.yaml
- typo3/sysext/frontend/Tests/Functional/SiteHandling/TypoLinkGeneratorTest.php 52 additions, 0 deletions...d/Tests/Functional/SiteHandling/TypoLinkGeneratorTest.php
Please register or sign in to comment