diff --git a/core/modules/menu_link_content/src/Form/MenuLinkContentForm.php b/core/modules/menu_link_content/src/Form/MenuLinkContentForm.php index 2ec806a..f9517e4 100644 --- a/core/modules/menu_link_content/src/Form/MenuLinkContentForm.php +++ b/core/modules/menu_link_content/src/Form/MenuLinkContentForm.php @@ -124,7 +124,10 @@ public function validateForm(array &$form, FormStateInterface $form_state) { if ($user_url) { // If the user entered the special case "" we must allow this // to not correspond to what Drupal thinks the URL is. - $user_link = str_replace('', '/', $user_link); + if ($user_link == '') { + global $base_path; + $user_link = str_replace('', $base_path, $user_link); + } // Compare the generated link from what Drupal thinks this is. We want // to do this without language prefixes, if applicable. $user_url->setOption('language', $this->language_manager->getDefaultLanguage());