Have not investigated why this happens as yet.

system-page-top-empty-div.png

Comments

dhrosa’s picture

Status: Active » Needs review
StatusFileSize
new601 bytes

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.

alanburke’s picture

Status: Needs review » Needs work

Cannot reproduce.
Tested with Toolbar module disabled.
Tested on all core themes.

Any steps to reproduce?

Jeff Burnz’s picture

StatusFileSize
new44.83 KB

Do a standard install and logout.

Fresh update a few hours ago and fresh install.

Jeff Burnz’s picture

Patch in #1 fixes the issue but begs the question why this happens only for $page_top and not all other regions.

cwgordon7’s picture

Status: Needs work » Reviewed & tested by the community

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.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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