Issue Bug Closed

#93786Redirect does keep language parameters

Albrecht Köhnlein 03/19/21, 16:44 updated 11/06/26, 08:50

Description

When configuring a redirect from an URL, which is not the default language, the redirect target is created without the correct language.

In the example below, “/en/” is the secondary language. When accessing the URL http://example.org/en/service-1, the redirect location is generated as http://example.org/de/service/, which is the default language instead of the expected http://example.org/en/service/ which would be expected redirect URL

Bildschirmfoto%20von%202021-03-19%2017-36-32.png

Reviews 1

Files 1

History 11

  1. Guido Schmechel commented <span data-processor="relativetime" data-value="2021-03-21T08:38:07+00:00" > 03/21/21, 08:38 </span>

    There are two issues with languages:

    1.) If you manually build a redirect, there is no smooth editor way for that: https://forge.typo3.org/issues/93162
    2.) For the autogenerated redirects there is a first WIP: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68202

  2. Chris Müller commented <span data-processor="relativetime" data-value="2021-04-07T13:12:57+00:00" > 04/07/21, 13:12 </span>

    As a workaround for the time being:
    - You can add a &L=1 to the target to get the correct language
    - You can use https://github.com/CMSExperts/link2language, then a select box with the available languages is shown in the link wizard which adds the &L= parameter

  3. Mathias Brodala commented <span data-processor="relativetime" data-value="2025-02-10T12:28:37+00:00" > 02/10/25, 12:28 </span>

    A very important aspect: when creating such a redirect, the option Keep GET Parameters must be enabled. Otherwise the manually (or via b13/link2language) added L=N will be dropped from the target URL on redirect.

  4. Benni Mack commented <span data-processor="relativetime" data-value="2026-11-06T08:49:41+00:00" > 11/06/26, 08:49 </span>

    This works on current versions: a redirect pointing to a page (t3://page?uid=…) is generated in the site language that was matched for the source URL, so /en/service-1 redirects to the English version of the target page without adding L= or enabling “Keep GET parameters”. This is covered by functional tests added with #105987 (main, 13.4, 12.4), including the language-prefixed path case from this report. Closing — please reopen if you can still reproduce it on 13.4 or 14. Choosing a different target language in the redirect form is tracked in #93162.