After searching all over these forums for an answer to this issue, I thought I'd raise it here.
Using the same primary/secondary link code in my customized page.tpl.php as in the stock box_grey distribution, the <ul></ul> tags are always printed, regardless of whether the "show primary/secondary links" checkboxes on the theme settings page are marked or not. As the link boxes are empty, the <ul> tags do not contain any <li> elements, resulting in an xhtml validation error.
<?php if (is_array($primary_links)) : ?>
<ul id="primary">
<?php foreach ($primary_links as $link): ?>
<li><?php print $link?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if (is_array($secondary_links)) : ?>
<ul id="secondary">
<?php foreach ($secondary_links as $link): ?>
<li><?php print $link?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
results in:
<ul id="primary">
</ul>
<ul id="secondary">
</ul>
Comments
Comment #1
TDobes commentedIsn't this a box_grey bug, then?
Comment #2
adrinux commentedfixed in 4.6 as per suggestion in http://drupal.org/node/15919