diff --git a/core/core.services.yml b/core/core.services.yml index 7007138..072c9e4 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -488,6 +488,11 @@ services: - { name: path_processor_inbound, priority: 200 } - { name: path_processor_outbound, priority: 200 } arguments: ['@config.factory'] + path_processor_none: + class: Drupal\Core\PathProcessor\PathProcessorNone + tags: + - { name: path_processor_inbound, priority: 200 } + - { name: path_processor_outbound, priority: 200 } path_processor_alias: class: Drupal\Core\PathProcessor\PathProcessorAlias tags: diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 46ed01d..55707ff 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1703,7 +1703,13 @@ function theme_menu_link(array $variables) { if ($element['#below']) { $sub_menu = drupal_render($element['#below']); } - $output = l($element['#title'], $element['#href'], $element['#localized_options']); + + if ($element['#href'] != '') { + $output = l($element['#title'], $element['#href'], $element['#localized_options']); + } + else { + $output = '' . $element['#title'] . ''; + } return '' . $output . $sub_menu . "\n"; } diff --git a/core/includes/path.inc b/core/includes/path.inc index 2187dd3..943115d 100644 --- a/core/includes/path.inc +++ b/core/includes/path.inc @@ -195,7 +195,7 @@ function drupal_valid_path($path, $dynamic_allowed = FALSE) { global $menu_admin; // We indicate that a menu administrator is running the menu access check. $menu_admin = TRUE; - if ($path == '' || url_is_external($path)) { + if ($path == '' || $path == '' || url_is_external($path)) { $item = array('access' => TRUE); } elseif ($dynamic_allowed && preg_match('/\/\%/', $path)) { diff --git a/core/includes/theme.inc b/core/includes/theme.inc index b65b71e..d6de966 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1697,7 +1697,12 @@ function theme_links($variables) { } else { // Pass in $link as $options, they share the same keys. - $item = l($link['title'], $link['href'], $link); + if ($link['href'] != '') { + $item = l($link['title'], $link['href'], $link); + } + else { + $item = '' . $link['title'] . ''; + } } } // Handle title-only text items. diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php index 8aea21d..86c895d 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php @@ -115,7 +115,7 @@ public function form(array $form, array &$form_state) { '#title' => t('Path'), '#maxlength' => 255, '#default_value' => $path, - '#description' => t('The path for this menu link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page.', array('%front' => '', '%add-node' => 'node/add', '%drupal' => 'http://drupal.org')), + '#description' => t('The path for this menu link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page. Enter %none for unlinked text.', array('%front' => '', '%add-node' => 'node/add', '%drupal' => 'http://drupal.org', '%none' => '')), '#required' => TRUE, ); }