Getting error message:
Notice: Undefined variable: highlighted in include() (line 56 of [...]/sites/all/themes/zen/templates/maintenance-page.tpl.php)
where [...] is the upper directory structure of my site's location.

This warning pops up in red at /user/login when the "default theme" is my own subtheme, but not when the "default theme" is Zen itself.

Sure enough, maintenance-page.tpl.php does have as line 56 "&#lt;?php print $highlighted; ?&#gt;.

My sub-theme doesn't include a replacement maintenance-page.tpl.php. But I wonder if in writing the sub-theme I've changed something else which has hindered it from setting the variable.

I don't think I've done anything non-kosher, so I'd have expected such a thing to degrade gracefully, in which case this would count as a bug (which is what I've provisionally set it to). But I'm happy to receive feedback/questions along the lines of "Did you change the XYZ? because that's probably what broke it" :-)

#17 errore-drupal7-tema-zen.jpg44.59 KBgiancarlopiccinini


Jennifer_M’s picture

Update: It's gone away now - possibly a consequence of clearing cache (?)

Jayson Wonder’s picture

Version: 7.x-3.1 » 7.x-5.x-dev


Yesterday I upgraded Zen theme based on the advise when I went to avaialble updates.

I am using a custom Zen subtheme. Initially I had no problems at all. This morning I realize that my site is down and I cannot log in or do anything.

The error I get on the page is:

Notice: Undefined variable: highlighted in include() (line 55 of /../../

If I look at the page itself line 55 has this:

print $highlighted;

I am not sure what to do to get my site working again since I cannot even access the admin section of the site.

Any advice is appreciated as I am kinda desperate.


KrisBulman’s picture

What does the regions section of your subthemes .info look like?

this needs to be present:

regions[highlighted] = Highlighted

Jayson Wonder’s picture

I added regions[highlighted] =Highlighted. No luck, can only get a page which says site under maintaince. The error is gone though. Cannot log in at all.

This was my original file.
regions[help] = Help
regions[sidebar_first] = First sidebar
regions[sidebar_second] = Second sidebar
regions[navigation] = Navigation bar
regions[highlight] = Highlighted content
regions[content] = Content
regions[header] = Header
regions[footer] = Footer
regions[bottom] = Page bottom
regions[page_top] = Page top
regions[page_bottom] = Page bottom

Jayson Wonder’s picture

Ok, The more I think about this I do not understand why my site randomly broke today instead of last night when I upgraded ZEN.

The big question I have now is, since I upgraded ZEN theme must I upgrade the STARTER KIT files that I have creaded my subtheme from. Essentially recreating my base theme as there may be new code in the new version of ZEN that breaks it?

I will experiement with this hoping to to further corrupt my site.

KrisBulman’s picture

yeah, you're working from a dev branch.. it will be constantly updating until it;s released.

If you want to create a subtheme from the dev branch, i would recommend a new subtheme from the starterkit folder and just copy over your changes from your old subtheme

also, yes.. it needs to be highlighted

KrisBulman’s picture

if this is a production theme, i recommend using only the non dev version. there will probably be some form of upgrade docs once 7.x-5.x-dev is released.

Jayson Wonder’s picture

Thank you I will try this.

Jayson Wonder’s picture

I have tried everything I could do to restore things. The site will not let me login and the only page I can reach is Site Maintaince Page.

It is not even the full page just the header and site offline message.

I cannot believe that this is happening.

I do not even know how or where to troubleshoot. I guess I need to start to create a whole new site 8(. This is awful

KrisBulman’s picture

you could install drush , navigate (in commandline) to the theme directory and use the command to set the default theme

drush vset theme_default garland

other drush commands found here:


there are other methods here:

KrisBulman’s picture

PS if you changed something in your .info file, you will need to clear drupal cache..

if you have drush installed, a simple command run from the drupal sites/yoursite dir will do this

drush cc all
Jayson Wonder’s picture

Thank you, I have installed Drush and changed my theme and cleared the cache,
still not luck. I fear something more serious is wrong with my installation as I still can only see the site maintaince and header logo.

I think it is time to rebuild site and take this as a horible learning experience.

Jennifer_M’s picture

Just wanted to add... I discovered just now that my offline copy was showing this error message. So I cleared the browser cache and it did indeed make the error message go away.

I'm pretty sure that this is a different thing from what Jayson had in comments above, though. In my case, neither site was broken, it just had this message as an extra thing on the page.

Jayson Wonder’s picture

I just ended up reinstalling everything and am now rebuilding my site, not sure what went wrong but I read and looked everywhere and without support I was helpless. Learning experience.

JohnAlbin’s picture

Title: Error message: Undefined variable $highlighted in Zen maintenance-page.tpl.php » Too easy to get undefined variable in maintenance-page.tpl.php
Component: PHP code » Documentation
Priority: Normal » Major
Status: Active » Fixed


Yes, if you add/remove/edit the regions in your .info file and page.tpl.php, you need to make the same changes in maintenance-page.tpl.php. But the docs in the .info file don't mention the maintenance-page.tpl.php at all.

I make this same mistake all the time too. Maybe some good docs will remind us all to alter the maintenance-page.tpl.php too!

I've updated the docs. If you think we need more to resolve this issue, feel free to re-open. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

giancarlopiccinini’s picture

44.59 KB

Using Drupal 7.9 with Update on alal check below Tenma Zen Zen 5.x-7.x-dev (2011-Nov-04)
combined with the theme easybreeze I updated all versions to Last
BUT put the errors out of site maintenance is under

Notice: Undefined variable: rdf_namespaces in include() (linea 17 di /var/www/vhosts/
Notice: Undefined variable: bottom in include() (linea 98 di /var/www/vhosts/

how to fix this?

Giancarlo Piccinini Italy


heleyon’s picture

I had the same problem related to the maintenance-page.tpl.php.
To solve it, the only solution I found was to modify the setting.php file.
just uncomment the following line:
$conf['maintenance_theme'] = 'bartik';
Hope it can be helpful!

JohnAlbin’s picture

@Giancarlo The RDF variable PHP notice is legit bug. You should have posted it to a new issue. Since this issue is closed, I normally won't ever any follow-up comments. The only reason I saw your comment was that this issue was referenced in an open issue and re-read this one for context. Anyway, you're lucky this time! And thanks for the bug report. Please see #1355444: $rdf_namespaces variable incorrectly printed in maintenance-page.tpl

@heleyon: That's one way to fix it! Use a different theme for the maintenance theme. But you could also copy Zen's maintenance-page.tpl over to your sub-theme and edit it to more closely match your sub-theme's page.tpl. It depends on if you want the same branding if the site is down.

JohnAlbin’s picture

Bevan had an interesting solution over in #1279838: Deleted regions cause PHP notices in maintenance-page.tpl.php which I've committed.