[buddypress-trac] [BuddyPress Trac] #6306: custom post type support for activities

buddypress-trac noreply at wordpress.org
Thu Mar 26 14:11:32 UTC 2015


#6306: custom post type support for activities
-----------------------------------+------------------------------
 Reporter:  shanebp                |       Owner:
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Component - Blogs      |     Version:  2.2
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------------------
Changes (by imath):

 * keywords:   => has-patch 2nd-opinion
 * version:  2.2.1 => 2.2
 * component:  Component - Activity => Component - Blogs
 * milestone:   => Awaiting Review


Comment:

 If you read carefully my last comment, i've written:
 > If you deactivate the option 'Allow activity stream commenting on blog
 and forum posts' then
 >> The result is that comments are not tracked.
 > becomes true

 I'm rephrasing : if the option 'Allow activity stream commenting on blog
 and forum posts' is not set, your code is working
 (https://gist.github.com/imath/36f588e77a7a574600cb#file-bp-custom-
 php-L27).

 Now, it seems you absolutely want to use the activity comments/comments
 syncing feature by setting the option 'Allow activity stream commenting on
 blog and forum posts' to true. Although i personaly think it's not a good
 idea, as it was possible in version 2.1.1 we can consider this as a
 regression we should fix in 2.2.2.

 I strongly feel a plugin using custom post types shouldn't use a feature
 that is '''restricted''' for regular posts so far. #5130 introduced
 comments syncing, but restricted the feature to the 'new_blog_post'
 action. See https://buddypress.trac.wordpress.org/browser/trunk/src/bp-
 blogs/bp-blogs-activity.php#L530. But it's a personal feeling and i might
 be too conservative.

 First, with a simple adaptation to the previous gist you can benefit from
 comment syncing without any change to core :
 see https://gist.github.com/imath/8c7c9702df3cd57d583b#file-bp-custom-
 php-L29 - symply make sure your bp_activity parameter is containing an
 'action_id' argument set to 'new_blog_post'.

 If we consider this as a regression, then we have two choices to fix it:
 1. 6306.patch: Make sure plugins filtering
 'bp_blogs_record_post_post_types' will get the regular posts activity
 tracking parameters. Meaning, the post types will not have it's own filter
 option in front or back.
 2. 6306.alt.patch: Or make sure plugins filtering
 'bp_blogs_record_comment_post_types' will get the regular posts activity
 tracking parameters.
 I personaly prefer this last option as it leaves a way to plugins only
 filtering 'bp_blogs_record_post_post_types' to still have their own
 activity action instead of being grouped with the regular post in the
 'new_blog_post' action.

 I'd like a second opinion on this issue to be absolutely sure we should
 take care of it as a regression and about the best option on how to fix
 it.

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


More information about the buddypress-trac mailing list