Drupal: visibility of side bars and custom regions on 404
stplanken — September 7, 2009 - 10:31

Drupal hides the left and right side bar on a 404 not found error. In itself this may be a good thing because when your site gets hit with a lot of 404's (not necessarily by humans) it can become a performance issue.
Drupal does this in includes/common.inc with drupal_not_found():
// To conserve CPU and bandwidth, omit the blocks.
print theme('page', $return, FALSE);
Any custom region that you create will not be hidden, just the left and right side bars. Depending on what you're after this may look a bit odd.
This problem can be solved with the block visibility for the individual blocks that you added to your custom region. If you set up your custom 403 and 404 pages in a logical way (admin/settings/error-reporting) — e.g. error/403 and error/404 — you can simply change the visibility settings for the blocks (admin/build/block).
If you want full control over what blocks are displayed regardless of the region simply rename your left and right side bars to something else using the theme's .info file:
;---------------- ; Theme regions ;---------------- regions[left] = Left sidebar regions[right] = Right sidebar regions[content] = Content regions[header] = Header regions[footer] = Footer regions[bottom] = Bottom block bar
If you add a region, you need to define all regions, including the existing ones.
Rename the default left and right regions to something else and you can control the visibility of all the blocks in that region with the visibility setting.

Hi, I could not find a better place to ask this. This site uses Marinelli theme be Leoni. I asked this question to Leoni also on his site, but he did not reply. How do I get that horizontal menu below the main banner??
Can you share the template & css you used to achieve that??
You mean the menu with the orange background? That is the secondary menu. From my
page.tpl.php:<?php if ($secondary_links) { ?><div id="submenu">
<?php print theme('links', $secondary_links, array('class' => 'links secondary-links')); ?>
</div>
<?php } ?>
The secondary links you can configure with:
admin/build/menu-customize/secondary-links. Also verify that you have secondary menus enabled with:admin/build/menu/settings("Source for the secondary links").