Prematurely falls back to default language

Created on 23 May 2019, about 6 years ago
Updated 13 June 2025, 24 days ago

Let's say I have two languages, English with an empty prefix, and Spanish set to es-ES. Let's also say I have two domains, US at /, and CA at /ca.

In certain cases, the homepage prematurely falls back to the default language. See these examples:

  • /ca: correctly falls back to English on CA
  • /ca/es-ES: correctly chooses Spanish on CA
  • /: correctly falls back to English on US
  • /es-ES: incorrectly falls back to English
  • /es-ES/some-path: correctly selects Spanish

So, if if the domain prefix is empty, and the language comes first, and we are on the homepage, then it falls back to the default language with no prefix set.

The error is in the language negotiator. Patch will follow.

πŸ› Bug report
Status

Needs review

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States devbanana

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024