[wp-trac] [WordPress Trac] #41796: WP_Term_Query problem using object_ids and number attributes

WordPress Trac noreply at wordpress.org
Mon Oct 16 18:28:00 UTC 2017


#41796: WP_Term_Query problem using object_ids and number attributes
--------------------------+---------------------------
 Reporter:  elvishp2006   |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.9
Component:  Taxonomy      |     Version:  4.8.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------------

Comment (by boonebgorges):

 > Since we only saw this with the tag cloud function, maybe making that
 function specify the fields it needs is an option.

 Maybe, but it's likely that others will run into similar issues in other
 use cases.

 >  Does it make any sense to just force the distinct in this situation?

 @elvishp2006 This is essentially what is already being done. Checking to
 see whether `$object_ids` is empty won't prevent issues like the one that
 @Otto42 has described.

 Given the late date, I'm going to revert and make a documentation note. If
 @elvishp2006 or others have ideas about how to fix the issue properly, we
 can reopen the ticket. If not, this'll have to be a documented quirk of
 the API.

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


More information about the wp-trac mailing list