[buddypress-trac] [BuddyPress Trac] #4786: Big activity stream bug after editing an entry in the activity dashboard - introduced in 1.6.3

buddypress-trac noreply at wordpress.org
Sat Mar 8 18:57:39 UTC 2014


#4786: Big activity stream bug after editing an entry in the activity dashboard -
introduced in 1.6.3
-----------------------------------+-----------------------
 Reporter:  rossagrant             |       Owner:
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:  2.0
Component:  Activity               |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+-----------------------
Changes (by boonebgorges):

 * keywords:  needs-patch => has-patch 2nd-opinion


Comment:

 The problem, as r-a-y suggests, is that plugins sometimes (often?) do not
 properly register their activity actions. As a result, the existing `type`
 does not show up in the 'Type' dropdown when editing an activity item, and
 when the item is saved, it's changed over to whatever type happens to be
 selected in the `<select>` box (like `created_group`).

 4786.patch is my suggested fix. When the `type` for the current item has
 not been registered properly with `bp_activity_set_action()`, we append it
 to the end of the dropdown. Obviously, we don't have a natural language
 label for the type, so I just display the raw type string (like
 'bp_doc_created').

 I've left the on-save sanitization in place
 (https://buddypress.trac.wordpress.org/browser/tags/1.6.4/bp-activity/bp-
 activity-admin.php#L422). Unregistered activity items won't be
 whitelisted, but that just means that `$activity->type` is not changed
 from the value saved in the database.

 Clearly, it'd be preferable for plugin authors to register their types in
 the correct way (and that'll be even more important when we have
 format_action callbacks #3856). But with this minimal change, we can at
 least prevent major breakage.

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


More information about the buddypress-trac mailing list