Coming from
#3446084-26: EntityTypeBundleInfo static caching is not language aware →
.
Developers have the expectation that ConfigOverrideLanguage is InterfaceLanguage.
Currently that is not the case for a quite long time in the request, because (quoting from
#3446084-26: EntityTypeBundleInfo static caching is not language aware →
):
The MR fixes the case i mentioned above, great work! Unfortunately i do not have access to the codebase that this problem originally occured in but i can still reproduce the issue in Drupal 11.2 with 2+ languages.
To reproduce it, do the following steps:
1. Create a KernelEvents::REQUEST subscriber with a priority higher than 255 (Higher than LanguageRequestSubscriber) that calls EntityTypeBundleInfoInterface::getAllBundleInfo().With core only:
2. Create a controller that just calls drupal_flush_all_caches(), then returns.
3. Visit the controller in another language than English, lets say Swedish.With admin toolbar:
2. "Admin toolbar" -> "Flush all caches" in a non English language, lets say Swedish.Now the English bundle labels are cached under the Swedish cache key. So in short, the bug occurs when calling EntityTypeBundleInfoInterface::getAllBundleInfo() before LanguageRequestSubscriber::onKernelRequestLanguage() directly after a cache rebuild in another language than English. I do not have time to narrow down the reproduction steps further than this, but it can be used to recreate my original issue.
Find a way to set ConfigurationLanguage to InterfaceLanguage instantly
- Write a test from the above
- Find a way to fix the problem
Maybe.
None expected.
Config language is now always in sync w/ interface language.
Active
11.0 🔥
language system
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.