Custom 404 - menu disappears I have created a custom 404 page using hook_preprocess_page():

function THEME_preprocess_page(&amp;$variables) {
  $header = drupal_get_http_header('status');
  if($header == '404 Not Found') {
    $variables['theme_hook_suggestions'][] = 'page__404';
  }
}


The contents of page--404.tpl.php is identical to the contents of page.tpl.php except that use a static text block instead of calling print render($page['content']);. When this page is displayed one of the menus disappears from the header. Everything else look just as it does when I'm on a ordinary page except for the menu.

Since I only wan't to change the actual message that is displayed when receiving a 404 page and still use the rest of the markup contained in page.tpl.php perhaps it would be a better idea to only alter the $page['content'] inside a hook or similar?

Would appreciate if anyone could help me figure out why the menu is vanishing or could give me a solution that only alters the $page['content'] in page.tpl.php in case of a 404.
If you can accept using a module for this, rather than a theme override, you should be able to use CustomError:


  This module allows the site admin to create custom error pages for HTTP status codes 403 (access denied) and 404 (not found), without the need to create nodes for each of them.


Just to make sure I've understood the use case: You write:


  Since I only wan't to change the actual message that is displayed when receiving a 404 page


This message is by default "Page not found  The requested page "..." could not be found. ".  I think CustomError' will reproduce the standard message unless you override this - but it may something about your use case that I have not understood.