[wp-trac] [WordPress Trac] #14477: get_pages with child_of only works with uninterrupted hierarchies

WordPress Trac noreply at wordpress.org
Sun Nov 2 14:15:01 UTC 2014


#14477: get_pages with child_of only works with uninterrupted hierarchies
--------------------------+-----------------------
 Reporter:  vividvisions  |       Owner:
     Type:  enhancement   |      Status:  reopened
 Priority:  normal        |   Milestone:  4.1
Component:  Query         |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------
Changes (by boonebgorges):

 * keywords:  has-patch commit =>
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 [30159] breaks `Tests_Post_Template::test_wp_dropdown_pages()`.

 This appears to be a symptom of a broader problem. [30159] makes it so
 that page ancestors are fetched in all cases. But then page children are
 fetched as well with `get_page_children()`. This results in potential
 duplicates in the results of `get_pages()`. I haven't looked into it
 deeply, but it may be enough to do duplicate detection after fetching the
 results (though this may break pagination/`number`).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14477#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list