Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By default, on 404 Not Found pages:
- The "Main menu" block, the "Secondary menu" block, and any other menu-based blocks are turned off. This is because, by default, the site_404 variable is blank, so there's no active menu item and, thus, menu_get_item() returns FALSE and menu_tree_page_data() will return no data. And since menu_tree() relies on menu_tree_page_data(), there's no menu trees.
- The Primary links and Secondary links of your theme are turned off. Again, menu_primary_links() relies on menu_tree_page_data().
So, basically on any 404 error page, all of your navigational menus are turned off. Considering that allowing a visitor to navigate away from a 404 error page is essential, this seems like a pretty big usability fail.
Comments
Comment #1
Dave ReidDuplicate of #116895: Show regions at 404 page.
Comment #2
JohnAlbinHeh, this is what I get for only half finishing my comments on #116895: Show regions at 404 page yesterday.
This issue is being split from that issue to make patch review easier. :-)
Comment #3
XanoSubscribing.
Comment #4
akahn CreditAttribution: akahn commentedI agree that this is a usability issue. John, what is your vision of this? In Drupal 7, should menus appear on 404 pages, or would this be an option? Where would the setting live?
Comment #5
jantoine CreditAttribution: jantoine commentedsubscribing.
Comment #6
dww#233807: No navigation links on 404 pages
Comment #7
a.milkovskyTry https://www.drupal.org/project/navigation404