Note: I am new to Drupal and PHP, so forgive my ignorance.

I currently maintain a Drupal site which uses a theme based on Genesis UltraLite 6.x-2.4

I am trying to get a maintenance page to work if the database goes offline. It looks like this is a known issue that you fixed in the latest dev code.

How stable is the dev code?
Is my best bet to use that theme code on a production website?

For now I took just a bit of your code from DEV and put it in genesis/genesis/template.php

Was I correct that this is all that Needs to be changed ? Any problems with doing this till the dev code goes gold ?

I replaced:

  if (!module_exists('conditional_styles')) {
    include_once $base_path . drupal_get_path('theme', 'genesis') . '/template.conditional-styles.inc';
    // _conditional_styles_theme() only needs to be run once.
    if ($theme == 'genesis') {
      _conditional_styles_theme($existing, $type, $theme, $path);
    }
  }  

With:

  if (db_is_active()) {
    if (!module_exists('conditional_styles')) {
      include_once(drupal_get_path('theme', 'genesis') . '/template.conditional-styles.inc');
      // _conditional_styles_theme() only needs to be run once.
      if ($theme == 'genesis') {
        _conditional_styles_theme($existing, $type, $theme, $path);
      }
    }
  }

Ignore the opening and closing php tags, that was just so it would be formatted in this post.
Thanks a lot.

Comments

Jeff Burnz’s picture

That should do the trick for you, the main bit is the if (db_is_active()) { ... }.

I only use the DEV version actually, and the only reason I havent released a newer version is time (just been really busy for about a year... lol).