Many a time, due to database problems, the default error pages gets shows. Now on production site, this is way too much information being shown to the user. I just want to show a simple custom page, that "Oops, We are working" or something...How can I get such page ?

Comments

notarealperson’s picture

Would this do the trick?

http://drupal.org/project/customerror

Pushkar Gaikwad’s picture

Aham, is this for custom 404 and 403 pages ?

What I am looking for is the page that drupal shows when it gets failed to connect to db ? Instead of showing the drupal default error page, I want to show my own custom page :)

arhak’s picture

it is hard coded, which means that you should:
- hack the core
- apply a patch (same as hacking the core)

now the place to tweak is database.inc near line 173 there is function _db_error_page responsible of that inflexible message

my suggestion is minimal hack to core, so, creating a patch to introduce a hook which allow to define such page as a themeable function/page, IOW allowing you to create something like db-error-page.tpl.php

for now I will ask you to join me requesting this to be customizable in future Drupal 7.x version (might get backported if accepted in D7)
please, leave a comment in http://drupal.org/node/317423