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.
Hey it seems that the primary links of a site disappear when a page not found error page is accessed. If a custom error page is specified the navigation returns. see
no navigation!
Comments
Comment #1
dvessel CreditAttribution: dvessel commentedIt has to do with the menu system. Something within menu_get_item..
Comment #2
setvik CreditAttribution: setvik commentedRan into this problem on a new site I'm building and asked about it on IRC...
From what I was told, this is apparently by design.
Menus (including "Primary Links") do not load or display on "Page not found"'s.
To work-around the problem, do the following:
1) Create a custom node to handle "Page not found"'s.
2) go to Admin -> Site Configuration -> Error Reporting and set the "Default 404 (not found) page:" to the node you just created.
Comment #3
pwolanin CreditAttribution: pwolanin commentedI think they should show.
Comment #4
pwolanin CreditAttribution: pwolanin commentedThe primary links are displayed based on the current page's path. Thus if the page is not found, there is no valid path and no links are displayed. What do you think should be displayed? Links as they would show on the front page?
This behavior is mostly "by design" since we want to minimize the work done on a page-not-found.
Comment #5
pwolanin CreditAttribution: pwolanin commentedIf anything, perhaps code comments explaining this would be helpful to add.
Comment #6
jeff h CreditAttribution: jeff h commentedCan you explain what you mean by "The primary links are displayed based on the current page's path"?
Regardless, I think it's not ideal giving users no obvious way to navigate out of a 404 page. So the front-page primary nav would be much better than nothing.
Comment #7
naybliss CreditAttribution: naybliss commentedI strongly agree with front-page navigation as a default. Leaving the user with no clear exit path is not user-friendly in the slightest.
Comment #8
cyberswat CreditAttribution: cyberswat commentedI disagree that core behavior should be modified to provided navigation elements. Custom functionality for 404's can be achieved at admin/settings/error-reporting or with modules such as http://drupal.org/project/customerror. The purpose of the 404 is to instruct the user the page doesn't exist ... take a look at http://apache.org/fsdhjfsdjk for a comparison from another system.
Comment #9
cyberswat CreditAttribution: cyberswat commentedComment #10
ahsanshahzad CreditAttribution: ahsanshahzad commentedi am facing the same issue in version 6.8
Comment #11
dwwThis really is a UI bug in core. But, it's duplicate with #233807: No navigation links on 404 pages