Question

What makes a maintenance mode message display, when a site is not in maintenance mode? In this instance, it appears that it was because a contrib module was throwing a recoverable fatal error. So there was no WSOD/ general crash but because there was an error, the maintenance mode message was being displayed. Is this possible? I suppose it's too localised to really be sure.

This question is for Drupal 6 (it can't connect to the database) is the same true for Drupal 7?

Maintenance mode is not turned on, yet I'm getting a maintenance mode message. What's more it's being displayed as a second HTML page rendered fully marked up, beneath the target page which is also rendered fully marked up: Maintenance page being rendered as an entire page load after the main page load

Was it helpful?

Solution

If not in Maintenance it could also be an uncaught PHP exception as suggested here: "The website encountered an unexpected error. Please try again later." so check your Drupal logs (Reports > Recent log messages), or a problem with your database service.

You can test whether it's a database offline situation by using a special theme template based off of maintenance-page.tpl.php called maintenance-page--offline.tpl.php where you put your own HTML and text instead of printing the $content variable:

<h2>Connection to database lost!</h2>
<p>[Suggestions about what to do...]</p>

You can test what the page looks like (on your local dev environment) by disabling the mysqld temporarily and visiting your local site. Don't forget to clear the cache to get the new template to register before trying to test it.

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top