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" :-)
Comment | File | Size | Author |
---|---|---|---|
#17 | errore-drupal7-tema-zen.jpg | 44.59 KB | giancarlopiccinini |
Comments
Comment #1
Jennifer_M CreditAttribution: Jennifer_M commentedUpdate: It's gone away now - possibly a consequence of clearing cache (?)
Comment #2
Jayson Wonder CreditAttribution: Jayson Wonder commentedHello,
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 /../../mysite.com/sites/all/themes/zen/templates/maintenance-page.tpl.php).
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.
Thanks,
Comment #3
KrisBulman CreditAttribution: KrisBulman commentedWhat does the regions section of your subthemes .info look like?
this needs to be present:
regions[highlighted] = Highlighted
Comment #4
Jayson Wonder CreditAttribution: Jayson Wonder commentedI 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
Comment #5
Jayson Wonder CreditAttribution: Jayson Wonder commentedOk, 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.
Comment #6
KrisBulman CreditAttribution: KrisBulman commentedyeah, 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
Comment #7
KrisBulman CreditAttribution: KrisBulman commentedif 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.
Comment #8
Jayson Wonder CreditAttribution: Jayson Wonder commentedThank you I will try this.
Comment #9
Jayson Wonder CreditAttribution: Jayson Wonder commentedI 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
Comment #10
KrisBulman CreditAttribution: KrisBulman commentedyou could install drush http://drupal.org/project/drush , navigate (in commandline) to the theme directory and use the command to set the default theme
other drush commands found here: http://drupal.org/node/530780
----
there are other methods here: http://drupal.org/node/200774
Comment #11
KrisBulman CreditAttribution: KrisBulman commentedPS 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
Comment #12
Jayson Wonder CreditAttribution: Jayson Wonder commentedThank 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.
Comment #13
Jennifer_M CreditAttribution: Jennifer_M commentedJust 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.
Comment #14
Jayson Wonder CreditAttribution: Jayson Wonder commentedI 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.
Comment #15
JohnAlbinHmmm…
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. http://drupalcode.org/project/zen.git/commit/b47a121 If you think we need more to resolve this issue, feel free to re-open. Thanks!
Comment #17
giancarlopiccinini CreditAttribution: giancarlopiccinini commentedUsing 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 http://drupal.org/project/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/giangi.name/httpdocs/sites/all/themes/zen/templates/maintenance-page.tpl.php).
Notice: Undefined variable: bottom in include() (linea 98 di /var/www/vhosts/giangi.name/httpdocs/sites/all/themes/zen/templates/maintenance-page.tpl.php).
how to fix this?
thanks
Giancarlo Piccinini Italy
translated http://translate.google.it/
Comment #18
heleyon CreditAttribution: heleyon commentedI 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!
Comment #19
JohnAlbin@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.
Comment #20
JohnAlbinBevan had an interesting solution over in #1279838: Deleted regions cause PHP notices in maintenance-page.tpl.php which I've committed.