- Issue created by @geek-merlin
- Merge request !7969Draft: EntityTypeBundleInfo returns wrong language → (Open) created by geek-merlin
- Status changed to Needs work
9 months ago 6:17pm 8 May 2024 - 🇩🇪Germany geek-merlin Freiburg, Germany
Added MR with one commit that adds a language key to the static cache.
It fixes the issue for me and proves that this low-level approach fixes the described behavioral issue.
The proper fix is of course a memory cache backend that handles invalidation too.
- First commit to issue fork.
- 🇸🇪Sweden maxsjoblom Örnsköldsvik
We found a case where the English translations got cached under a different langcode, because config translation overrides weren't loaded yet by the event listener
\Drupal\language\EventSubscriber\LanguageRequestSubscriber::setLanguageOverrides
. Since the entity bundle info translations are based on the config override system, we first try to use the active config override language and then fall back to current language. This makes sure that the cached values matches the cache key.