Hi,

I have composed a custom page for handling 404 errors and set it in Administer/Error Reporting as default page to display when 404 error accurs .

If I access this page directly everything looks OK. But if I enter URL that doesn't exist on the site, I get redirected to my custom 404 page but all blocks including search form are gone.

I've created a test placeholder block a checked that both it and search form are set to be visible to all roles and have 'Show on every page except the listed pages.' set up.

What should I check next?
Thanks for help.

Comments

betz’s picture

I found this topic dealing with the same question
http://drupal.org/node/129762

charmer’s picture

To reiterate, block display was taken out of 5.x to avoid the performance hit of loading them on 404 pages, so this issue is basically intentional on Drupal part.

You can override displaying the blocks in your theme template, specifically, add the following to your template.php file:

function THEME-NAME_page($content, $show_blocks = TRUE) {

  $show_blocks = TRUE; // as a result even custom 404 page will get default blocks
  return phptemplate_page($content, $show_blocks);
}

And rename THEME-NAME to the name of your theme.