[buddypress-trac] [BuddyPress Trac] #5874: BP_Groups_Group::get() returns incorrect results when using meta_query with multiple meta_values and OR relationship

buddypress-trac noreply at wordpress.org
Mon Sep 15 13:09:53 UTC 2014


#5874: BP_Groups_Group::get() returns incorrect results when using meta_query with
multiple meta_values and OR relationship
--------------------------+------------------------------
 Reporter:  richtelford   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Groups        |     Version:
 Severity:  major         |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by richtelford):

 Yeah this is happening on my localhost as well.

 I know that joining tables together with comma syntax can be problematic -
 as is hinted at in the get_meta_query_sql() code. When debugging this
 initially, I took the SQL output created by get_meta_query_sql() and get()
 from bp-groups-classes.php, dropped it into Navicat to see what was going
 on. The first thing I tried was replacing the comma joins with inner joins
 and the problem (which I'm experiencing) was sorted. So perhaps the
 problem is related to ambiguous joins.

 I'll try updating to the trunk revisions you are testing with - see if
 that makes a difference. There is no caching enabled on my localhost
 setup.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5874#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list