Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This happens with PHPTemplate node.tpl.php and both bluemarine and pushbutton.
The problem is with the following
<span class="taxonomy"><?php print $terms ?></span>
That generates
<span class="taxonomy"><ul class="links inline"></ul></span>
Which is invalid XHTML when we use W3C validator
document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag
The solution is to use a <div>
instead of the <span>
Comment | File | Size | Author |
---|---|---|---|
#4 | 85667.span_.to_.div_.taxonomy.patch | 1.58 KB | beginner |
Comments
Comment #1
lvadillo CreditAttribution: lvadillo commentedThis I found thanks to the Drupal search system, it's terribly old.
If it's that simple to fix, can someone who know how to do it please. I cannot work with non W3C compliant pages, something quite important nowadays.
Thank you.
Comment #2
be9 CreditAttribution: be9 commentedIt's due to theme_links() function, which by default renders links in a
.
This can be redefined inside your theme.
Comment #3
be9 CreditAttribution: be9 commentedOops, forgot the code tag.
I meant, it's theme_links() that renders an
<ul>
Comment #4
beginner CreditAttribution: beginner commentedI confirm that the problem is with bluemarine and pushbutton.
Garland already use div instead of span.
I checked style.css: it's theming
.node .taxonomy
so having a span or a div won't make a difference.Comment #5
beginner CreditAttribution: beginner commentedThe same patch applies cleanly on D6, too.
Please apply on HEAD, and backport to D5.
Comment #6
Gábor HojtsyFixed in HEAD, moving to 5.x.
Comment #7
recidive CreditAttribution: recidive commentedMarked #252277: Taxonomy term page fails to validate with Bluemarine as duplicate of this one.
Comment #8
NancyDruHmm, this was available before several 5.x versions and hasn't rolled out yet? I wasted several hours on this today when I should have been working on the real issue.
Comment #9
fgmThis patches fixes the XHTML grammar problem, but changes the display: the terms are displayed below the title instead of remaining on the far right (at least in Opera).
The hackish patch I did on #25277 fixes that too, but should be improved, probably by moving the "inline" specification to style.css
Comment #10
recidive CreditAttribution: recidive commented"This patches fixes the XHTML grammar problem, but changes the display: the terms are displayed below the title instead of remaining on the far right (at least in Opera)."
Ok, do you experience this issue on Drupal 6 and HEAD on Opera?
If so, we need to patch HEAD with a full solution, i.e. adding some lines to style.css, then backport to Drupal 6 and 5.
Comment #11
fgmD6 and HEAD have the same UI bug as D5 with this patch applied. Neither looks like the original D5 : the terms are below the node info instead of being flush right with it.
Comment #12
dpearcefl CreditAttribution: dpearcefl commentedConsidering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.