The My Sections user page completely screws up my HTML5 template. I have no idea what it's doing. I've attached screenshots of the damage, including portions of Firebug's HTML hierarchy view, so you can see the havoc it's wreaking.
I've tried moving some tags around to see if I could figure out what's going on, but haven't been able to decipher the problem so far. I'll keep at it (as this is the last thing to fix before the site goes live) and post back if I can figure it out.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 913900-html5.patch | 702 bytes | agentrickard |
| #4 | html.txt | 2.09 KB | agentrickard |
| my sections hierarchy.png | 310.9 KB | lanny heidbreder | |
| my sections page.png | 306.26 KB | lanny heidbreder | |
| normal page with hierarchy.png | 310.6 KB | lanny heidbreder |
Comments
Comment #1
lanny heidbreder commentedOkay, there are two culprits at play here.
Here's the content area of my page.tpl.php:
And here's the corresponding HTML of the My Sections page:
It's hard to tell because it won't keep my effing indentation, but there are two problems with the rendered HTML. At the end of the second "paragraph" of code in the second snippet above, there's a spurious
</ul></div>. This is the main problem that causes the HTML hierarchy to be so screwed up. Also, the<div id="menu-access">is never closed properly.I'm digging through the PHP now to see if I can come up with a patch.
Comment #2
agentrickardThat ul / div issue is coming from tabs primary -- e.g. the menu system -- not MNE.
The lack of closure around #menu-access should probably get fixed in menu_node_edit_preprocess_page().
Comment #3
lanny heidbreder commentedI'm not much of a Drupal developer, so I suppose that's technically possible, but the only page on the whole complete site on which this problem manifests itself is the MNE page. On every other page, including several pages with both primary and secondary local tasks, Drupal plays nicely. So it has to be MNE's interaction with something, even if MNE isn't inserting the code itself.
The only thing that occurs to me is that "Section" is a special word in MNE, and I'm using
<section>tags, so maybe MNE interacts with those poorly somehow? Seems far-fetched, but something's happening.Comment #4
agentrickardMy mistake, the extra
</ul></div>is coming frommenu_node_edit_preprocess_page(), which is faking the presence of the secondary tabs.It's likely the failure to close the 'menu-access' div id. See #2, and try the last line of the code, where we add an extra
</div><section>is irrelevant.What does the page look like in Garland, the default theme? I can't replicate the error on Garland or a custom site theme that's we're using, based on Zen.
Attached is what the same section of the page looks like in Garland, and here there is an extra
</ul>.Comment #5
agentrickardThis should solve the issue. Committed.