diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 1b1a52a..3cce004 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -2404,9 +2404,9 @@ function menu_link_get_preferred($path = NULL, $selected_menu = NULL) { foreach ($menu_names as $menu_name) { if (empty($preferred_links[$path][$menu_name]) && isset($candidates[$link_path][$menu_name])) { $candidate_item = $candidates[$link_path][$menu_name]; - //$map = explode('/', $path); - //_menu_translate($candidate_item, $map); - if (TRUE || $candidate_item['access']) { + $map = explode('/', $path); + _menu_translate($candidate_item, $map); + if ($candidate_item['access']) { $preferred_links[$path][$menu_name] = $candidate_item; if (empty($preferred_links[$path][MENU_PREFERRED_LINK])) { // Store the most specific link. diff --git a/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php b/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php index eb0e641..523ef0f 100644 --- a/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php +++ b/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php @@ -54,7 +54,7 @@ public function viewModeTypeSelection() { if ($entity_info['fieldable'] && isset($entity_info['controllers']['view_builder'])) { $entity_types[$entity_type] = array( 'title' => $entity_info['label'], - 'href' => 'admin/structure/display-modes/view/add/' . $entity_type, + 'link_path' => 'admin/structure/display-modes/view/add/' . $entity_type, 'localized_options' => array(), ); } @@ -77,7 +77,7 @@ public function formModeTypeSelection() { if ($entity_info['fieldable'] && isset($entity_info['controllers']['form'])) { $entity_types[$entity_type] = array( 'title' => $entity_info['label'], - 'href' => 'admin/structure/display-modes/form/add/' . $entity_type, + 'link_path' => 'admin/structure/display-modes/form/add/' . $entity_type, 'localized_options' => array(), ); } diff --git a/core/modules/system/lib/Drupal/system/SystemManager.php b/core/modules/system/lib/Drupal/system/SystemManager.php index 9d5e910..1fa6246 100644 --- a/core/modules/system/lib/Drupal/system/SystemManager.php +++ b/core/modules/system/lib/Drupal/system/SystemManager.php @@ -209,17 +209,16 @@ public function getAdminBlock($item) { foreach ($menu_links as $link) { _menu_link_translate($link); if ($link['access']) { - // Prepare for sorting as in function _menu_tree_check_access(). - // The weight is offset so it is always positive, with a uniform 5-digits. - $key = (50000 + $link['weight']) . ' ' . Unicode::strtolower($link['title']) . ' ' . $link['mlid']; - $content[$key] = $link->build(); // The link description, either derived from 'description' in // hook_menu() or customized via menu module is used as title attribute. - // @todo - make description a separate entity property. - if (!empty($content[$key]['#options']['attributes']['title'])) { - $content[$key]['#description'] = $content[$key]['#options']['attributes']['title']; - unset($content[$key]['#options']['attributes']['title']); + if (!empty($link['localized_options']['attributes']['title'])) { + $link['description'] = $link['localized_options']['attributes']['title']; + unset($link['localized_options']['attributes']['title']); } + // Prepare for sorting as in function _menu_tree_check_access(). + // The weight is offset so it is always positive, with a uniform 5-digits. + $key = (50000 + $link['weight']) . ' ' . Unicode::strtolower($link['title']) . ' ' . $link['mlid']; + $content[$key] = $link; } } ksort($content); diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php index 91f63d9..ab55143 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php @@ -302,7 +302,6 @@ protected function doTestMenuGetItemNoAncestors() { */ protected function doTestMenuSetItem() { $item = menu_get_item('test-page'); - debug($item); $this->assertEqual($item['path'], 'test-page', "Path from menu_get_item('test-page') is equal to 'test-page'", 'menu'); diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index a70d10d..0fce7e4 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -345,9 +345,9 @@ function theme_admin_block_content($variables) { } $output .= '