diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php index ded74f2..7100004 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php @@ -105,6 +105,12 @@ public function getLangcode(Request $request = NULL) { */ public function reactSelectedLanguage(LanguageInterface $selected_language) { $request = \Drupal::request(); + + // Do not redirect if one of the url prefixes is empty. + if (in_array('', language_negotiation_url_prefixes())) { + return FALSE; + } + // \Drupal::urlGenerator() will run processOutbound() which will // adapt the URL with the url negotiation from the selected language. $options = array('language' => $selected_language, 'query' => $request->query->all());