When has no tabs on the page then an empty <div> goes to output. Like this: <div class="tabs clearfix"></div>
Because the $tabs variable in the region--content.tpl.php file is an array. Like this:

    [#theme] => menu_local_tasks
    [#primary] => 
    [#secondary] => 

This check is not enough: if ($tabs) :
This is better: if ($tabs && !empty($tabs['#primary']) :


hmmdinger’s picture

Agreed. I just spent a good bit of time debugging some extra space in IE7 that ended up being because of this empty $tabs div.

othermachines’s picture

Marked #1385770: Tabs Wrapper printed even if tabs is empty as duplicate of this issue.

Hydra’s picture

Status:Active» Needs review
845 bytes
None View

Had this issue also some times...

Cellar Door’s picture

Assigned:Unassigned» himerus

ah IE7 how we love you so... :)

himerus’s picture

Assigned:himerus» Unassigned
Status:Needs review» Fixed

Comitted to 7.x-3.x

Status:Fixed» Closed (fixed)

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

Chris Burge’s picture

Version:7.x-3.x-dev» 7.x-4.x-dev
Issue summary:View changes
Status:Closed (fixed)» Active
599 bytes
None View

Re-opening this issue as there is a regression in 7.x-4.x. The line is question is as follows in 7.x-4.x:

<?php print render($tabs); ?>

This results in the re-introduction of the bug fixed by this issue in 7.x-3.x. This issue proposes fixing the regression by changing the line as follows:

<?php print ($tabs && !empty($tabs['#primary']) ? render($tabs) : '' ); ?>

Patch is attached.

Chris Burge’s picture

I haven't tested either 7.x-5.x, and 8.x-5.x, but neither of these versions check !empty($tabs['#primary']. It is probable that this bug exists in both versions, too. I'll defer to someone more active with the project on those versions.

Chris Burge’s picture

Status:Active» Needs review
tedfordgif’s picture