I hope this is the right place. If not please let me know where.

I'm working on setting up drupal in a subfolder. I was asked to upgrade my omega theme, did so and now I get this when I try to open the site:

* Notice: Undefined variable: default_container_width in include() (line 15 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/page.tpl.php).
* Notice: Undefined variable: default_container_width in include() (line 16 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/page.tpl.php).
* Notice: Undefined variable: default_container_width in include() (line 24 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/page.tpl.php).
* Notice: Undefined variable: default_container_width in include() (line 25 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/page.tpl.php).
* Warning: include(/home/content/35/7395235/html/info/sites/all/themes/omega/omega/templates/region.tpl.php) [function.include]: failed to open stream: No such file or directory in theme_render_template() (line 1234 of /home/content/35/7395235/html/info/includes/theme.inc).
* Warning: include() [function.include]: Failed opening '/home/content/35/7395235/html/info/sites/all/themes/omega/omega/templates/region.tpl.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in theme_render_template() (line 1234 of /home/content/35/7395235/html/info/includes/theme.inc).
* Notice: Undefined variable: doctype in include() (line 35 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/html.tpl.php).
* Notice: Undefined variable: rdf in include() (line 36 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/html.tpl.php).
* Notice: Trying to get property of non-object in include() (line 36 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/html.tpl.php).
* Notice: Undefined variable: rdf in include() (line 36 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/html.tpl.php).
* Notice: Trying to get property of non-object in include() (line 36 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/html.tpl.php).
* Notice: Undefined variable: rdf in include() (line 37 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/html.tpl.php).
* Notice: Trying to get property of non-object in include() (line 37 of /home/content/35/7395235/html/info/sites/all/themes/omega/starterkit/templates/html.tpl.php).

You can see it live here: http://www.bodiesinmotionwithgilad.com/info/

Any help would be appreciate.

Tom

Comments

himerus’s picture

The following issue: #1060320: Make Zones Renderable Arrays marks minor changes in page.tpl.php that require you edit your subtheme. (this edit IS required for the alpha > beta switch.

The following issue: #1060338: Omega > HTML5 marks how to update any custom templates you have in your subtheme to HMTL5 (which omega now fully supports)

viking217’s picture

I have absolutely no clue what to do with that info. Not a programmer. So when I'm asked to upgrade the Omega theme I'm expected to do whatever the above instructions says?.

himerus’s picture

Assuming you've made a new subtheme for your site called MYTHEME... you need to go into your sites/all/MYTHEME/templates folder

Edit page.tpl.php
It should look as follows:

<div id="page" class="clearfix">
  <?php if (isset($page['zones_above'])): ?>
  <div id="zones-above" class="clearfix"><?php print render($page['zones_above']); ?></div>
  <?php endif; ?>
  <div id="zones-content" class="clearfix">
    <?php if (isset($action_links)): ?>
      <div id="actions-container" class="container-<?php print $default_container_width; ?> clearfix">
        <div class="grid-<?php print $default_container_width; ?>">
          <ul class="action-links">
            <?php print render($action_links); ?>
          </ul>
        </div>
      </div>
    <?php endif; ?>
    <?php if (isset($messages)): ?>
    <div id="message-container" class="container-<?php print $default_container_width; ?> clearfix">
      <div class="grid-<?php print $default_container_width; ?>">
        <?php print $messages; ?>
      </div>
    </div><!-- /.container-xx -->
    <?php endif; ?>
    <?php if (isset($page['content_zone'])): ?>
      <?php print render($page['content_zone']); ?>
    <?php endif; ?>
  </div>
  
  <?php if (isset($page['zones_below'])): ?>
  <div id="zones-below" class="clearfix"><?php print render($page['zones_below']); ?></div>
  <?php endif; ?>
</div><!-- /#page -->

Notice the relevant changes which are changing the following:

$zones_above becomes $page['zones_above']
$content_zone becomes $page['content_zone']
$zones_below becomes $page['zones_below']

In the cases where the zones are printing.... they have changed from:

print $zones_above;

To

print render($page['zones_above']);

If you have not changed your page.tpl.php in your custom subtheme, you can simply paste the above code into your subtheme's page.tpl.php

I apologize that this needs to be changed, and YES does break sites until a few minor edits are made. This was required for the alpha > beta switch for flexibility moving forward, and will not need to be changed again. The Beta release(s) mark an API "freeze" where no structural changes will require any edits to templates to continue to function.

himerus’s picture

Title: Upgraded and my entire site went down » Alpha to Beta upgrade renders empty page

I'm changing the title of this so that others may find it easier, as you aren't the only one that will/has experienced this.

viking217’s picture

Hi...
Thanks for such quick response. I was testing and learning about the Omega Theme which I absolutely love! I did not create my own theme so I'm working with the original. I found out later that I should make copies and vreat my own.

If I start over again.... which version should I upload to avoid this? I'm not that far into building this drupal site so I can manage starting over doing it right from the start.

himerus’s picture

@Viking217

The best practice (with base themes like omega) is to make a copy of the starterkit, and rename items. There is info in the README.txt of Omega, and in the starterkit folder that describe the process... there are a few items to edit in your copy of the subtheme so that there are no naming conflicts... and your subtheme should be outside the main Omega folder... so if you have sites/all/themes/omega, your copy of the starterkit should go in sites/all/themes/YOURTHEME..

viking217’s picture

Thanks again..

I think I'll start over... I can't get the site back to normal ;-) Just to make sure if I download the Beta version I will not have to perform this adjustments in the future?

himerus’s picture

Status: Active » Fixed

If you upgrade to Beta3 (latest download) everything should work...

One issue everyone keeps having (and not just with Omega) is using the automated update in Drupal.

It will mess up the folder structure.... so it is best to remove the omega directory in sites/all/themes and replace it completely with the new version...

This core bug is the culprit: http://drupal.org/node/986616 sometimes of some issues which will make omega buggy after an update because it will download omega to the wrong location and you will end up with a folder omega/omega/omega, containing 2 versions of the base theme.

viking217’s picture

Thanks... I noticed I got another omega directory too.

I'm starting from scratch with new everything, I was not far into the site building anyways. Now I know much more thanks to you. I'm new to drupal, maybe Omega is not the "easiest" theme to learn drupal with --- or maybe it is, anyhow I like the 960 grid's flexibility. I know it from joomla. But a drupal site seem (well soon for me I hope) to be so much easier to manage than joomla.

Thanks again for super quick responses. That's a great comfort when one venture into something new.

himerus’s picture

Title: Alpha to Beta upgrade renders empty page » Upgrading from Alpha versions renders empty page

Changing this title as it would also affect users going from Alpha > Stable as well.

knalstaaf’s picture

Issue tags: +undefined variable, +content_zone

The notice it returned in my case was:

Notice: Undefined variable: content_zone in include() (line 36 of /var/www/vhosts/domain.be/httpdocs/sites/all/themes/themename/templates/page.tpl.php).

Applying the code modification in #3 and clearing the cache afterward works indeed. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -undefined variable, -content_zone

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