Skip to content
Snippets Groups Projects

Issue #3385550: Language negotiation breaks updating Drupal 9 to 10

Open Rolando Payán Mosqueda requested to merge issue/drupal-3385550:3385550-10.1.x into 11.x
Files
3
@@ -130,10 +130,7 @@ public function processOutbound($path, &$options = [], Request $request = NULL,
}
$languages = array_flip(array_keys($this->languageManager->getLanguages()));
// Language can be passed as an option, or we go for current URL language.
if (!isset($options['language']) || ($options['language'] instanceof LanguageInterface && in_array($options['language']->getId(), [
LanguageInterface::LANGCODE_NOT_SPECIFIED,
LanguageInterface::LANGCODE_NOT_APPLICABLE,
]))) {
if (!isset($options['language']) || ($options['language'] instanceof LanguageInterface && $options['language']->getId() == LanguageInterface::LANGCODE_NOT_SPECIFIED)) {
$language_url = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_URL);
$options['language'] = $language_url;
}
Loading