[wp-trac] [WordPress Trac] #18986: Link categories filter doesn't show all categories

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 20 15:47:55 UTC 2011


#18986: Link categories filter doesn't show all categories
--------------------------+---------------------
 Reporter:  ocean90       |       Owner:  ryan
     Type:  defect (bug)  |      Status:  closed
 Priority:  high          |   Milestone:  3.3
Component:  Taxonomy      |     Version:  3.3
 Severity:  major         |  Resolution:  fixed
 Keywords:  has-patch     |
--------------------------+---------------------

Comment (by duck_):

 Replying to [comment:7 SergeyBiryukov]:
 > Since `$taxonomy->object_type` can be an array, is it possible for a
 taxonomy to be attached to both a registered post type and some other
 object? Do we need to take that into account here (perhaps looping over
 `$object_types`)? [attachment:18986.3.patch] illustrates what I'm thinking
 of.

 I think there would be a problem with [attachment:18986.3.patch]. The term
 count is updated on every loop iteration so after the function call then
 it would only equal the number of relationships for the last object type.

 I do think there might be a problem here, but haven't tested it yet and
 not super familiar with the problem being solved. In [19025] we check
 `post_type_exists( $object_type )` and then seem to assume all the objects
 are post types and implode them for `post_type IN`. I assume that
 `$object_type` is left over from the loop through `$object_types` and so
 is the last object type. What if one of the other ones is a link?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18986#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list