[buddypress-trac] [BuddyPress Trac] #6099: groups/favorites/friends activity scopes when displayed user has not any 'scope' items

buddypress-trac noreply at wordpress.org
Fri Jan 9 18:06:00 UTC 2015


#6099: groups/favorites/friends activity scopes when displayed user has not any
'scope' items
------------------------------+------------------
 Reporter:  imath             |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  high              |   Milestone:  2.2
Component:  Activity          |     Version:
 Severity:  major             |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+------------------

Comment (by r-a-y):

 Nice catch, imath!

 I forgot to port over no results from my feature-as-a-plugin.  In my
 plugin, I used a no-results clause like in `no-results.patch`.  But based
 on the way that custom scopes are handled in each respective scope filter
 function, I can understand the approach in `6099.patch` as well.

 IMO, both patches are about equal when it comes to debugging.

 If I were debugging the activity query's `WHERE` conditions and saw this:

 {{{
 [scope_query_sql] =>
 (
         (
                 a.component = 'groups'
                 AND
                 a.item_id IN ( 0 )
         )

 )
 }}}

 I would wonder where `a.item_id IN ( 0 )` came from.

 Whereas, this might be more explicit:


 {{{
 [scope_no_results] => 0 = 1
 }}}

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


More information about the buddypress-trac mailing list