[buddypress-trac] [BuddyPress] #3455: BuddyPress activity comment recording for Blog posts does not honour the WordPress post type visibility

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Aug 12 12:57:28 UTC 2011


#3455: BuddyPress activity comment recording for Blog posts does not honour the
WordPress post type visibility
-------------------------+-----------------------
 Reporter:  sbrajesh     |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  1.5
Component:  Blogs        |     Version:  1.5
 Severity:  minor        |  Resolution:
 Keywords:  2nd-opinion  |
-------------------------+-----------------------
Changes (by boonebgorges):

 * keywords:  has-patch => 2nd-opinion
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 anointed - Thanks for jumping in here.

 The behavior in 1.2.9, where CPT posts are *not* recorded, while CPT
 comments *are*, is inconsistent and incorrect. It should be changed.
 However, anointed's comment shows that some people's BP installations are
 currently relying on BP's inconsistency for important site functionality.

 The "correct" solution is for people like anointed to create custom
 functions, like the one he's got for "sermons", that integrate CPT
 comments into the activity stream. In other words, copy the entire
 function bp_blogs_record_comment() (along with the hook to comment_post),
 change the name, and then change the newly added CPT check lines
 https://buddypress.trac.wordpress.org/browser/trunk/bp-blogs/bp-blogs-
 functions.php#L249 to
 {{{
 // Don't record activity if the comment's associated post isn't one of my
 custom post types
 if ( 'sermons' != $recorded_comment->post->post_type && 'devotionals' !=
 $recorded_comment->post->post_type )
     return false;
 }}}

 I'm reopening this ticket to get feedback on a few questions:
 1) Do we have a sense of how many users r4959 will negatively affect?
 anointed is one; do you think there will be many, many more? Are there,
 for example, common BP plugins that use CPTs and thus are probably
 exploiting the error that this ticket was opened to address?
 2) How many users will r4959 *positively* affect? That is, how many people
 use CPTs in a way that allows comments, but does not make sense in the
 activity stream?
 3) How do we want to proceed? Regarding #3460, it would be trivially easy
 to implement a new function that is a catcher for all other custom post
 type comments, with a filter at the top of blacklisted CPTs; meanwhile, we
 could leave r4959 as is. This would be the beginning of the API proposed
 in #3460, and would be 100% non-retrograde. However, given that we are
 approaching a final beta, is it too late to add something substantial like
 this?

 Feedback welcome. We shouldn't make a large architectural decision based
 merely on anointed (though I'm sure your site is cool, there is a
 straightforward enough workaround, as described above!!), his report may
 be indicative of more widespread complaints after release.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3455#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list