Posted by Jeff Burnz on August 21, 2010 at 10:46pm
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | theme system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Have not investigated why this happens as yet.

| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| system-page-top-empty-div.png | 28.67 KB | Ignored: Check issue status. | None | None |
Comments
#1
Edited modules/system/region.tpl.php to only print a region if it has content. system_page_alter checks if a region isn't empty before wrapping it, however that content might eventually not be rendered.
#2
Cannot reproduce.
Tested with Toolbar module disabled.
Tested on all core themes.
Any steps to reproduce?
#3
Do a standard install and logout.
Fresh update a few hours ago and fresh install.
#4
Patch in #1 fixes the issue but begs the question why this happens only for $page_top and not all other regions.
#5
Looked into this a bit, this happens because toolbar ads some elements to the page top region, but they are not displayed for anonymous users because for them #access = FALSE. So while the render()able array does not look empty, the content once actually rendered is, in fact, empty. This has to be done at the template level because the only safe way to tell if the render()able array is empty is to render it and look at the result, and since we do not want to render the elements twice, we have no choice but to check the result after it is rendered.
#6
Committed to CVS HEAD. Thanks.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.