[wp-trac] [WordPress Trac] #29418: Taxonomy archive query not including all of its post types.

WordPress Trac noreply at wordpress.org
Thu Jan 2 02:44:49 UTC 2020


#29418: Taxonomy archive query not including all of its post types.
----------------------------------------+---------------------
 Reporter:  msaggiorato                 |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:
Component:  Taxonomy                    |     Version:  3.9.2
 Severity:  normal                      |  Resolution:
 Keywords:  needs-testing dev-feedback  |     Focuses:
----------------------------------------+---------------------
Changes (by Howdy_McGee):

 * keywords:  needs-patch => needs-testing dev-feedback


Comment:

 Here's how I see it. At this point (LN 2135) in the get_posts method we're
 simply looking for post types matching the current taxonomy, that's all.
 We should be including all post types not just searchable ones. It doesn't
 really matter for searchable types anyway. Whenever a search query is
 added it sets the post_type to 'any' which then goes out and grabs all
 searchable post type as seen in lines 1847 -> 1854 -> 2409.

 Removing the `exclude_from_search` flag solves this issue, continues to
 keep the post type unsearchable, and doesn't undo the original patches
 work.

 Adding additional flags to fix this bug would end up causing more
 confusion than necessary. Maybe this change would be easier to apply with
 a major update so there's plenty of notice prior and testing to be done.

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


More information about the wp-trac mailing list