- Status changed to Needs work
over 1 year ago 12:41pm 13 December 2023 - 🇬🇷Greece bserem
@dewalt I assume you meant patch 59 was the source, as there is no patch in 56, and 56 is just a typo mistake.
- 🇷🇴Romania ita08
I made a patch to address an issue where the language code was always taken from the current language, ignoring the 'langcode' query parameter in the request.
in EntityBrowserController.php, on line 66:
$langcode = $this->languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
I updated this line with:$langcode = $request->query->get('langcode') ? $request->query->get('langcode') : $this->languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();
The patch now checks if a 'langcode' is provided in the query; if so, it uses that value, otherwise it falls back to the current language.
If the langcode is always taken from the current language, this lead to issues that when editing an entity reference, it does not load the content in the translation language.