When language order is changed on /admin/config/regional/language, the old language order is used until the cache is cleared

Created on 26 August 2025, 11 days ago

Problem/Motivation

If I change the order of languages in /admin/config/regional/language, the old order is used until I clear caches. This can lead to confusion about how language order works if users change the order of the language and do not think of clearing the cache, and do not notice any change in the system.

Steps to reproduce

* new Drupal 11 site
* drush si -y
* drush en -y content_translation
* /admin/config/regional/language/add
* Add the language "French"
* /admin/config/regional/language/add
* Add the language "Spanish"
* /admin/config/regional/language
* Confirm that the languages are ordered Englsh - French - Spanish
* /admin/structure/types/manage/page
* Language settings: Enable translation: Save
* /node/add/page
* Title: "This is the page in English"
* Save
* /fr/node/1/translations/add/en/fr
* Title: "This is the page in French"
* Save (this translation)
* Now, /fr/node/1 shows "This is the page in French" and /node/1 shows "This is the page in English" as expected.
* Now, /es/node/1 shows "This is the page in English"
* /admin/config/regional/language
* Set the order to French - English - Spanish
* Save configuration
* Now, /es/node/1 shows "This is the page in English"
* drush cr
* Now, /es/node/1 shows "This is the page in French"

Proposed resolution

Non-existing translations's (in this case Spanish) should recalculate the displayed language automatically (perhaps by invalidating cache tags) when the order of the languages change.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.2 🔥

Component

language system

Created by

🇨🇦Canada alberto56

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024