Problem/Motivation
During an outage of the MySQL server for my hosting provider access non-cached pages of the website caused the following error:
Fatal error: Call to undefined function node_get_types() in /root/drupal/sites/all/themes/zeropoint/template.php on line 15
Sites that where not using zeropoint theme did not see this error, but instead displayed a "lost connection to database" error.
Steps to reproduce this error are as follows.
- access a non-database or cached website page, no error occurs on multiple pages
- access administration page, or another page that queries the database and the fatal error occurs
- Changed the settings.php file default maintenance_theme from zeropoint to minnelli. (I had set the maintenance_theme for the site to zeropoint to keep my site offline/maintenance pages the same as the online theme)
- minnelli maintenance theme reports loss of connection to database
- reset settings.php file maintenance_theme from minnelli to zeropoint
- access administration page "www.root.com/admin/" and the error persisted
- Once the MySQL service outage was resolved I could access all site pages without an error
Proposed resolution
I don't know enough about the drupal system to clearly define a resolution other than to allow the theme to report back to the end users that there is a maintenance issue and that the site is offline. One item to note is that I did not appreciate the minnelli and garland them reporting my internal MySQL servers name to logged in users, much less anon users (example: "databasename.servername.internalhost.com")
Comments
Comment #1
florian commented