I get the following 2 notices on the Styleguide page itself when I use Styleguide with any Omega 4 subthemes:

Notice: Undefined variable: header in include() (line 53 of /var/www/site/docroot/sites/all/themes/contrib/omega/omega/templates/system/maintenance-page.tpl.php).
Notice: Undefined variable: footer in include() (line 65 of /var/www/site/docroot/sites/all/themes/contrib/omega/omega/templates/system/maintenance-page.tpl.php).

Not sure if this is a Styleguide or Omega issue but I've got to start somewhere!

Comments

jwilson3’s picture

The code snippet in the patch on #1279838-4: Deleted regions cause PHP notices in maintenance-page.tpl.php solved the problem for me.

in omega subtheme's template.php:

/**
 * Implements hook_process_maintenance_page().
 */
function my_omega_subtheme_process_maintenance_page(&$variables, $hook) {
  // Ensure default regions get a variable. Theme authors often forget to remove
  // a deleted region's variable in maintenance-page.tpl.
  foreach (array('header', 'navigation', 'highlighted', 'help', 'content', 'sidebar_first', 'sidebar_second', 'footer', 'bottom') as $region) {
    if (!isset($variables[$region])) {
      $variables[$region] = '';
    }
  }
}
jwilson3’s picture

Project: Style Guide » Omega

I think this is an Omega theme issue. They could adopt the solution used by Zen to handle this same problem (discussed in issue linked on comment #1 above).

dddbbb’s picture

Title: Notices when used with an Omega 4 subtheme » PHP Notices when used with Styleguide module

Updated issue title to make more sense in the context of the Omega issue queue.

jwilson3’s picture

I've had this problem without Styleguide installed. Unfortunately, I didn't track down which module combination was causing the issue, though I don't believe this is caused by just some module combination. It's a TX issue. My understanding, from reading the other issue linked above, is you can get this problem by overriding page.tpl.php in your theme and changing regions around, but then don't change maintenance-page.tpl.php.

So I'm not sure the title of this issue is appropriate, but dont have a better one to suggest either :(

jwilson3’s picture

Title: PHP Notices when used with Styleguide module » Undefined header/footer variables in maintenance-page.tpl.php

How about this?