- Issue created by @geek-merlin
- Merge request !7969Draft: EntityTypeBundleInfo returns wrong language → (Open) created by geek-merlin
- Status changed to Needs work
12 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. - 🇫🇮Finland iSampo
I don't think I've ever been this happy seeing an issue with a solution. This indeed does fix the bundle translation issue that happens on paragraph form "Add" buttons, exposed Views bundle filters etc. And for what it's worth, it also fixes the mentioned other issue that was quite confusing:
- FTR: Also, clicking that paragraph button adds a *different* paragraph (that with the last button) to the form. (Which looks like a separate form builder bug.)
Adding a patch from the current MR changes for composer patching, hope it's okay.