[buddypress-trac] [BuddyPress] #5118: Activities meta_query can load duplicates

buddypress-trac noreply at wordpress.org
Fri Jul 26 18:09:47 UTC 2013


#5118: Activities meta_query can load duplicates
--------------------------+-----------------------------
 Reporter:  imath         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Activity      |    Version:  1.8
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Let's say i have this meta_query :

 {{{
 $meta_query = array(
         'relation' => 'OR',
         array(
                 'key' => 'test',
                 'value' => 1,
                 'type' => 'numeric',
                 'compare' => '='
         ),
         array(
                 'key' => 'rand',
                 'value' => 2,
                 'type' => 'numeric',
                 'compare' => '='
         )
 );
 }}}

 Now in bp_activity table, i have the 2 metas for 2 different activities,
 let's say :
 - activity 19 has a 'test' meta_key with the value of 1
 - activity 18 has a 'rand' meta_key with the value of 2

 The result is ok, it displays activities 19 && 18

 Now if activity 19 has a 'test' meta_key with the value of 1 and a 'rand'
 meta_key with the value of 2, then the result is not ok as it displays the
 activity 19 three times.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5118>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list