being _db_error_page hard coded makes impossible to display a custom message without patching the core files
this brakes i18n/l10n support, of course there won't be a t() function available but making some kind of customizable hook available would be enough to decide in which language and which message to display to the website users (for instance in a db-error-page.tpl.php file)

Comments

arhak’s picture

mmm... found this one http://drupal.org/node/80775
since 2006 there are users asking how to do this and the answer still is "hacking the core"

arhak’s picture

ambel’s picture

Absolutely a necessity,

I am working for a corporation right now who has implemented Drupal as a back-end database system, and we had a failure the other day with our database server. Luckily, we put our hot-backup system online and resolved the issue in less than ten minutes, but it caused concern when the only thing showing all across our site was a big blue error with a massive Drupal icon and a message about the state of our internal database.

This kind of error can frighten existing clients and beat away new ones. Immediately, I was tasked with getting rid of it.

Hacking the core is no problem, but as stated, it shouldn't be necessary. I agree with making the stride in 7.x for a better solution for customizing ALL error pages; not just 404/403.

Ambel

idealista’s picture

+1 on this :)

bill

EvanDonovan’s picture

Also there was a patch to 5.7 that my co-worker made: #233579: Drupal 5.7 Error Handling Information Patch. Definitely would be glad to see more flexibility in how these error messages are displayed, although it probably won't make it into 7.x by now.

EvanDonovan’s picture

Until a patch is made to Drupal core, the issue can be worked around in the following manner:

1) In settings.php, set the maintenance theme to a custom theme.
2) Copy modules/system/maintenance-page.tpl.php to your custom theme directory.
3) Add the following to the <head> of that file:

<style type="text/css">
small { display:  none}
</style>

Now the MySQL error message will not show up, unless you view the source of the page.

Crell’s picture

Version: 7.x-dev » 8.x-dev

Unless there's a security issue here, I think this is D8 material.

jhedstrom’s picture

Version: 8.0.x-dev » 8.1.x-dev
Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs issue summary update

These functions and templates are long gone in D8...anything left to do here?

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

More information about this issue was asked for in #8, 7 years ago. No additional information has been supplied, and as that comment points out the function and templates were removed. Therefor closing as outdated.

Thanks!