Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#5574 closed enhancement (invalid)

Extended customized errors

Reported by: coolmann's profile coolmann Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords:
Focuses: Cc:

Description

One feature I appreciated in 2.3.2 is the chance to have customized db errors, using the wp-content/db-error.php page. I'd like to point your attention on two issues:

  • Why don't you move the db-error.php page inside the theme folder? So that theme developers can also distribute it inside one single folder
  • What about customizing the wp_die function declared in functions.php? Currently I'm using an hacked version, in which I added this row

Included a custom error page, much better than the standard one!
And of course commented the one below
include($_SERVERDOCUMENT_ROOT?.'wp-content/themes/duechiacchiere/wp-die.php');

at row 1260, and removed the static HTML code included below that line. I know this is not the "best" way to do it, but maybe it's a beginning!

Have a happy new Year!
camu.

Change History (7)

#1 in reply to: ↑ description @filosofo
17 years ago

Replying to coolmann:

Why don't you move the db-error.php page inside the theme folder? So that theme developers can also distribute it inside one single folder

The problem is that when the database is down, there's no way to know which is the live theme, because that's something that's stored in the db.

#2 @coolmann
17 years ago

I see, even if this information could be written in the wp-config.php

#3 @DD32
17 years ago

I guess it could be possible to allow a page within wp-content that can be loaded for errors.

ie.

if( error == db-down && file_exists( ABSPATH . WPCON . '/db-down.php') ){
   include(ABSPATH . WPCON . '/db-down.php');
} else if ( error == fatal && file_exists( ABSPATH . WPCON . '/wp-die.php') ){
   include( ABSPATH . WPCON . '/wp-die.php' );
} else {
   //normal wp-die stuff
}

#4 @ffemtcj
17 years ago

  • Milestone changed from 2.5 to 2.7

No Patch. Moved to 2.7

#5 @ryan
17 years ago

  • Milestone changed from 2.7 to 2.8

#6 @FFEMTcJ
16 years ago

  • Milestone changed from 2.8 to Future Release

#7 @Denis-de-Bernardy
16 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

db errors are no longer shown.

Note: See TracTickets for help on using tickets.