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.

  1. access a non-database or cached website page, no error occurs on multiple pages
  2. access administration page, or another page that queries the database and the fatal error occurs
  3. 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)
  4. minnelli maintenance theme reports loss of connection to database
  5. reset settings.php file maintenance_theme from minnelli to zeropoint
  6. access administration page "www.root.com/admin/" and the error persisted
  7. 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

florian’s picture

Status: Active » Closed (works as designed)