Menus Disappear on Page Not Found

behindthepage - May 1, 2007 - 02:58

In version 5 when a "Page not found" is displayed there are no sidebar or menus displayed. Just when you need a menu to go to a "real" page there are none. Does anyone know how I can get them to display?

Thanks
gpdinoz

That's been bugging me too

NancyDru - May 1, 2007 - 04:36

Maybe someone who has an answer can tell us. We go to the trouble to set up 403/404 pages and they don't do us any more good than a default page.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

I suppose we could have a page with a menu on it

behindthepage - May 1, 2007 - 10:50

I suppose we could have a page with a menu on it...... er... like a sitemap... and have that as the 404 page but I want my menus!

gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein

If you want to hack the core

behindthepage - May 3, 2007 - 12:56

If you want to hack the core, all you need to do is change line 356 in common.inc (found in the includes folder)

From
  print theme('page', $return, FALSE);
To
  print theme('page', $return);

Easy!

gpdinoz
"Everything should be made as simple as possible, but not simpler." - Albert Einstein

Works, but incomplete

NancyDru - May 3, 2007 - 20:11

Apparently someone decided to "improve" my site's performance under 5.x, without asking me if I liked the idea. When a "page not found" (404) occurs, the menu is not shown, so users can be lost and not realize how to get back into my site (yes, this has happened)

gpdinoz suggested a simple hack to common.inc, but it seems to me that it would be better to rectify the whole "you didn't ask me" question. This patch adds two check boxes to the error-reporting settings page (system.module) to indicate whether the blocks should be shown. Then it modifies common.inc to check those values when displaying the error pages.

Here it is: http://drupal.org/node/141162

I have looked over the much larger patch to this area (http://drupal.org/node/77514), and I think this would be a valuable addition to that if someone wants to merge it.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

The proper way to do this,

Morbus Iff - May 5, 2007 - 17:32

The proper way to do this, without adding yet more configuration variables, is to create a new node, fill it with whatever "page isn't found!" content you want (which could be nothing at all, of course), then set the "Default 404 (not found) page" (in admin/settings/error-reporting) to that node. This is actually a lot more powerful than what you propose because, as a site creator, you can customize the message and/or include links to the latest features of your site (more entrypoints to shepard the lost sheep home).

http://www.disobey.com/
http://www.gamegrene.com/

Read the post and the cookbook

NancyDru - May 6, 2007 - 00:28

The custom 404 page already exists, what gets turned off is the look and feel of Drupal because some unknown person decided that menus and blocks aren't needed to get my errant, and now disoriented, visitor back into my site.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

is this going to change back in drupal 6?

mygumbo - August 14, 2007 - 17:14

I just upgraded to 5.2 and was reminded of this problem since I had to hack common.inc again.

Unlikely

NancyDru - August 14, 2007 - 21:59

Too many of the powers-that-be think this is a good idea. Go to http://drupal.org/project/drupal and search for "404" you'll find a long discussion.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

Bad idea. Possible solution

iantresman - February 26, 2009 - 11:14

What a stupid decision. Now people who inadvertently find a "Page not found" have no way to choose an alternative page. I have no menus, no blocks, no title link (because I have a graphic), and no other links on the page. In other words, they are stuck.

A possible solution also appears to be the module "404 Blocks" which revives (a) "Left" and "Right" regions of your theme (b) "Primary links"

Has this actually been solved? I'm having the same problem..

JonGirard - September 30, 2007 - 23:47

Hi,

I'm having the same problem (or something very simillar) with my customized blue marine theme.
When I create a new link to a new page, when I go to access that new page by clicking on the link, I simply get a blank page, just the design.

So, I tried changing the theme to charmeleon, and infact when clicking on the links there is a "page not found" error on the page, (it just isn't appearing on my bluemarine theme, which probably isn't that big of a deal).

My logs also confirmed that the pages could not be found.

So as it seems, we are infact all having the same problem..

Jon.

 
 

Drupal is a registered trademark of Dries Buytaert.