[buddypress-trac] [BuddyPress Trac] #5519: confusions about BP_Activity_Activity::get_recorded_components() returning recorded components

buddypress-trac noreply at wordpress.org
Mon Apr 7 13:19:09 UTC 2014


#5519: confusions about BP_Activity_Activity::get_recorded_components() returning
recorded components
--------------------------+------------------
 Reporter:  sbrajesh      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  2.0
Component:  Activity      |     Version:  2.0
 Severity:  minor         |  Resolution:
 Keywords:                |
--------------------------+------------------
Changes (by boonebgorges):

 * type:  enhancement => defect (bug)


Comment:

 sbrajesh - Many thanks for reporting this.

 >  It lists the members as component in BuddyPress 2.0 causing some empty
 actions for the entry.

 Just to clarify: I'm assuming that the empty entries are last_activity
 entries, since they don't have an activity action callback function. Is
 this correct?

 We didn't catch this because it looks like BP does not use
 `BP_Activity_Activity::get_recorded_components()`, except in
 `bp_get_activity_filter_links()`, which itself is unused by BP. However,
 it does appear that you're not the only person using it. See eg
 https://github.com/search?q=get_recorded_components&ref=cmdform&type=Code.

 Since 'last_activity' is the only activity type currently associated with
 the members component, and since 'last_activity' items aren't fully-
 fledged activity items for display, I think you're right that it makes
 sense to remove them by default. But there could be legitimate cases where
 someone would want them included, so I think it also makes sense to have
 an argument that lets you get everything.

 Could you have a look at 5519.patch? I've written unit tests that I think
 cover all the relevant cases, but the logic could use another set of eyes.

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


More information about the buddypress-trac mailing list