I noticed that with a tree of taxonomy terms the ul elements were not being nested correctly - the li which would be the nested ul's parent is being closed before the nested ul begins - whereas it should only be closed once the nested ul is closed.

This causes invalid mark-up, and CSS issues (n.b. I believe this is a report of the same bug: #139825: Problem of display in Firefox)

Here's a patch which fixes this behaviour, and produces valid mark-up (which is also a little more readable, with some line breaks added).

Please apply this patch to the module once you're happy with it.


mcdruid’s picture

new1.88 KB

updated patch - improved (whitespace) formatting of the HTML output for nested lists

no longer here 281698’s picture

Is this a patch of the d6 dev or the d5 dev?

mcdruid’s picture

Version:master» 5.x-1.x-dev

Sorry - my patch is for the D5 version of the module (it was marked as simply 'HEAD').

mcdruid’s picture

Status:Needs review» Closed (duplicate)

I believe these three issues are all the same:

#133090: Fails validation due to incorrectly nested lists.
#231850: site_map fails to nest ul's correctly when displaying taxonomy trees
#299014: Wrong syntax in rendered source (HTML validator error) in dept menupoint

I'm marking the last 2 as duplicates of the first (which is currently marked RTBC), although I've been using the patch I attached to this issue (#231850: site_map fails to nest ul's correctly when displaying taxonomy trees) for some time, and am happy with it. It's the maintainer's call which patch gets applied, but it would be good to fix this bug one way or another, IMHO.

frjo’s picture

Version:5.x-1.x-dev» 6.x-1.x-dev
Assigned:Unassigned» frjo
Status:Closed (duplicate)» Fixed

Committed to 6-dev. Thanks fo the patch mcdruid, and sorry that it took ages for me to commit it.

Status:Fixed» Closed (fixed)

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

kingandy’s picture

Could we get a D5.x commit? Since that's what the patch was originally written for...!