Problem/Motivation
When viewing the list of redirects in /admin/config/search/redirect, the “To” path column always displays URLs with the UI language prefix (e.g., /fr/...) regardless of the actual redirection language defined.
This is misleading, especially in multilingual sites with different source/target path aliases.
Screenshot in English UI

Screenshot in French UI

Steps to reproduce
- Create a multilingual Drupal site with at least English and French enabled.
- Set site default language to English.
- Create a node with translations in both languages.
- Create a redirect from
/test(language = English) to/node/20(English) - View the redirect list in
/admin/config/search/redirect - Change UI language to French
Expected result
The “To” column still shows /en/alias if the redirect is in English.
Actual result
The “To” column shows /fr/..., which does not reflect the redirection language and is misleading.
Additional note
The actual redirection works correctly — however, the displayed paths in the “To” column are incorrect, as they always show the URL with the current UI language prefix instead of the actual redirection language.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Redirect_langcode.png | 74.4 KB | ritarshi_chakraborty |
Issue fork redirect-3538116
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
avpadernoComment #3
ritarshi_chakraborty commentedWorking on it.
Comment #5
ritarshi_chakraborty commentedPipeline failing at phpunit. Please review my MR.
Comment #6
ritarshi_chakraborty commentedComment #7
ritarshi_chakraborty commentedFixed the pipeline error! Please review my MR.
Comment #8
baikho commentedTested MR 169 and works with regards to displaying the correct language prefix by specified language but the destination URL alias is now lost and ends up with only formats such as
/fr/node/123. I believe the fix needs to retain the URL alias too.Comment #9
baikho commentedActually no, it works fine, in my case the translated destinations didn't have an alias. RTBC for me!
Comment #11
baikho commentedMade some additional changes in new MR 197