Redirect language is not considered

Created on 16 November 2023, about 1 year ago

Context

I'm rebuilding a multilingual site with 4 languages and a news overview page on the following paths

  • /en/news
  • /nl/nieuws
  • /fr/actualites
  • /de/nachrichten

the old site had the same, but on untranslated aliases, like:

  • /en/news
  • /nl/news
  • /fr/news
  • /de/news

so I have 3 redirects from the old to the new aliases in place

  • /nl/news -> /nl/nieuws
  • /fr/news -> /fr/actualites
  • /de/news -> /de/nachrichten

Problem

the "News" segment of the breadcrumb is not being linked to the overview page for EN language only

Reason

the redirects are found in getRequestForPath() method, but language is not considered, so for "/en/news" it considers the DE redirect, while it should not

Proposed solution

loop over the found redirects and filter by current language (since the Redirect service's lookup method does not have a filter on language atm.)

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇷🇴Romania reszli Târgu Mureș

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024