[wp-trac] [WordPress Trac] #32592: Duplicate user results when using nested meta queries with inner OR relation

WordPress Trac noreply at wordpress.org
Tue Jun 9 04:11:53 UTC 2015


#32592: Duplicate user results when using nested meta queries with inner OR
relation
--------------------------+--------------------
 Reporter:  maxxsnake     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.3
Component:  Users         |     Version:  4.2.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------
Changes (by boonebgorges):

 * keywords:   => has-patch
 * milestone:  Awaiting Review => 4.3


Comment:

 maxxsnake - Thanks very much for the detailed report. I've confirmed the
 bug as well as your diagnosis.

 [attachment:32592.diff] is one way to go about fixing this. It provides a
 utility method `has_or_relation()` for checking to see whether a single OR
 appears in any of the meta clauses. It does the trick, though it's a bit
 on the ugly side. maxxsnake, do you have thoughts about the approach?

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


More information about the wp-trac mailing list