#3080 closed defect (bug) (fixed)
wp_list_pages() is not closing the </li> in some circumstances
Reported by: | JeremyVisser | Owned by: | ryan |
---|---|---|---|
Milestone: | 2.1 | Priority: | highest omg bbq |
Severity: | critical | Version: | 2.1 |
Component: | Template | Keywords: | bughunt |
Focuses: | Cc: |
Description
When wp_list_pages()
is called limiting the depth of pages to be listed, it seems to be forgetting the closing </li> sometimes and invalidating the markup.
The arguments passed to it is 'sort_column=menu_order&depth=1&title_li=
' and if I remove the depth=1
the markup will validate but will show all the pages, which is not what I want.
I can reproduce the error in the K2 theme, which uses the depth=1 argument.
I think the error is occurring in the Walker_Page class and could be related to #2668 but I don't have the PHP skills to be sure.
Attachments (1)
Change History (10)
#4
@
18 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Oops. Closed the wrong one.
#6
@
18 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I just got the trunk from SVN, and this problem is still in effect as far as I can tell. Same situation, same code.
Go to http://binarybonsai.com to see it (in the menu). I'll gladly send a screenshot of my static page structure, as I think that might be where wp_list_pages() stumbles.
#7
@
18 years ago
- Priority changed from high to highest omg bbq
- Severity changed from normal to critical
Seems to be the opposite case: redundantly closed </li>
Here's what I see on Binary Bonsai:
<ul class="menu"> <li class="current_page_item"><a href="http://binarybonsai.com/" title="Blog">Blog</a></li> <li class="page_item"><a href="http://binarybonsai.com/archives/" title="Archives">Archives</a></li> <li class="page_item"><a href="http://binarybonsai.com/wordpress/" title="WordPress">WordPress</a></li> </li> <li class="page_item"><a href="http://binarybonsai.com/about/" title="About">About</a></li> </ul>
(In [4563]) Export file content type fixups from mdawaffe. fixes #3080