Updated: Comment #0
When converting a MENU_CALLBACK to new routing system, if the hook_menu entry is completely removed, all menus are removed from the page.
Steps to reproduce:
- Clone drupal 8 and checkout commit: a8d4542933c61484d1719394ae9843f25f325cde
- curl https://drupal.org/files/drupal8.test_page_test.1987868-19.patch | git apply -v --index
- Install Drupal 8
- drush en test_page_test -y
- Go to /test-page
Result: page has no home menu link at top
Expected result: page has home menu link
menu_get_tree should not rely on menu_get_item() but primarily take the route object on the current request into account.
On the longrun we should remove the menu_get_item() call.
Review, RTBC, commit
The issue was discovered in the above issue. The unique thing about tests with the test_page_test_page callback, is most of the menu_test module entries use the test page as their callback, and because they test the menu system, some of the tests go directly to the /test-page and look for menus on that page. That's most likely why this wasn't discovered earlier.
PASSED: [[SimpleTest]]: [MySQL] 58,527 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 58,778 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 58,462 pass(es). View