Excuse the cryptic title but I've just spent a day trying to figure this out, don't know what's going on.
Made a zen subtheme on one site where it worked fine, and then today copied it to another site (shared host, and don't have access to cpanel logs) and it won't work. The front page shows fine. But all other pages show only unstyled navigation. The page source shows empty <head> </head> tag and node title and navigation, but no content.
Zen is in the themes folder with the subtheme. Upgraded to 5 but no change.
Zen as default works, as does any other theme. Cleared cache, disabled, re-abled.
I'm working on this on a sick day so I'm hoping that's the explanation, that I'm just missing the obvious.

Comments

JohnAlbin’s picture

Upgraded to 5 but no change.

If you developed your sub-theme using the Zen 7.x-3.x branch, keep using it. Switching to Zen 5 will break things.

The page source shows empty tag

The breakage you are describing is beyond what I thought possible to break with a theme. Its odd that Zen by itself works fine, but its only when switching to your theme that the problems occur.

I haven't heard of a problem like this. I would suggest creating a new sub-theme and copying over parts of your broken sub-theme until the problem occurs. That should help you isolate what is wrong.

Good luck!

seaneffel’s picture

I'm experiencing this problem now with a sub-theme of Zen that I made into a standalone theme. All pages sparkle except for the mysite.com/user/login page. I noticed that there are no values in the head HTML tag when that page is loaded, just like described by the OP.

Another admin coded a custom button that changes text depending on the $logged_in value in the theme template. It worked fine in D6, but in D7 seems to crap out. Commenting out the code for that custom button then renders the user/login page correctly. Here is what the code looks like:

<div id="user">
  <?php if($logged_in) : ?>
    <?php print l('<span>My Account</span>', 'user', array('attributes' => array('class' => 'account'), 'html' => TRUE)); ?>
  <?php else: ?>
    <?php print l('<span>Login</span>', 'user', array('attributes' => array('class' => 'login'), 'html' => TRUE)); ?>
  <?php endif; ?>	
</div>

Maybe you have a similar thing breaking your login page. If you do, maybe you can figure out what we did wrong in the code that caused it to break the theme. Thanks!

seaneffel’s picture

Dropping the arrays from the conditional links put the /user/login page back in working order. I don't know if this is relevant for your project, but take a look over your page.tpl.php file to see if errant arrays cause your trouble, too.

<div id="user">
  <?php if($logged_in) : ?>
    <span><?php print l('My Account', 'user'); ?></span>
  <?php else: ?>
    <span><?php print l('Login', 'user'); ?></span>
  <?php endif; ?>	
</div>
seaneffel’s picture

One additional thought. Use Firebug to determine the last div loaded on your /user/login page. For me that helped isolate where the trouble was.

JohnAlbin’s picture

Version: 7.x-5.0 » 7.x-5.x-dev
Status: Active » Postponed (maintainer needs more info)

Does upgrading to 5.1 solve anything?

JohnAlbin’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
JohnAlbin’s picture

Issue summary: View changes

Added code tags

pvdpdrop’s picture

I've noticed the page is quite old but I believe the problem is more general.
For those encountering this problem, below my experience and solution:

- Started with the same observations: on some webpages the head section of the HTML response was empty and also big part of the body tag was empty
- In an attempt to isolate and reproduce the problem, I finally restored an exact copy of the website on my local VM where the problem did NOT reproduce
- I concluded it must be related to the server and NOT to the Drupal site itself - therefore, I started looking into log files of the server and observed memory problems
- After restart of the server, the problem was solved
- In case it is not permanently solved, increase the PHP memory (but read about possible disadvantages https://www.drupal.org/docs/7/managing-site-performance-and-scalability/...)

Hope this helps others who encounter a similar problem.