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 English UI

Screenshot in French UI
Screenshot in French UI

Steps to reproduce

  1. Create a multilingual Drupal site with at least English and French enabled.
  2. Set site default language to English.
  3. Create a node with translations in both languages.
  4. Create a redirect from /test (language = English) to /node/20 (English)
  5. View the redirect list in /admin/config/search/redirect
  6. 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.

CommentFileSizeAuthor
#6 Redirect_langcode.png74.4 KBritarshi_chakraborty

Issue fork redirect-3538116

Command icon 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

zyef created an issue. See original summary.

avpaderno’s picture

Version: 8.x-1.11 » 8.x-1.x-dev
ritarshi_chakraborty’s picture

Assigned: Unassigned » ritarshi_chakraborty

Working on it.

ritarshi_chakraborty’s picture

Assigned: ritarshi_chakraborty » Unassigned
Status: Active » Needs review

Pipeline failing at phpunit. Please review my MR.

ritarshi_chakraborty’s picture

StatusFileSize
new74.4 KB

Screenshot of Redirects

ritarshi_chakraborty’s picture

Fixed the pipeline error! Please review my MR.

baikho’s picture

Status: Needs review » Needs work

Tested 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.

baikho’s picture

Status: Needs work » Reviewed & tested by the community

Actually no, it works fine, in my case the translated destinations didn't have an alias. RTBC for me!

baikho’s picture

Status: Reviewed & tested by the community » Needs review

Made some additional changes in new MR 197