[buddypress-trac] [BuddyPress] #2342: Blog Comment Link in Activity Stream Broken has ID# Twice

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Apr 25 16:53:35 UTC 2010


#2342: Blog Comment Link in Activity Stream Broken has ID# Twice
-------------------------+--------------------------------------------------
 Reporter:  hotforwords  |       Owner:       
     Type:  defect       |      Status:  new  
 Priority:  normal       |   Milestone:  1.2.4
Component:  Core         |    Keywords:       
-------------------------+--------------------------------------------------
 BuddyPress integrated with Wordpress Single User  in the activity stream
 if someone makes a comment on the Wordpress Blog side the link to the
 comment in the Activity stream is correct EXCEPT that the comment number
 is doubled at the end, thus breaking the link.

 I reference the problem in this thread:
 http://buddypress.org/community/groups/how-to-and-
 troubleshooting/forum/topic/blog-comment-link-in-activity-stream-broken-
 has-id-twice/
 ------
 It appears that some code in function bp_blogs_record_comment() of bp-
 blogs.php is causing the issue. In BP v1.2.3, if you look at line 429 and
 430, you can see the culprit.

 `$comment_link = get_permalink( $comment->comment_post_ID ) . ‘#comment-’
 . $comment_id;
 $activity_action = sprintf( __( ‘%1$s commented on the blog post %2$s’,
 ‘buddypress’ ), bp_core_get_userlink( $user_id ), ‘comment_ID . ‘”>’ .
 $comment->post->post_title . ‘‘ );`

 If you look at line 430 near the end, the comment ID is appended to the
 built string. But, that comment ID has already been included in the
 variable $comment_link which is built above on line 429. So, you get a
 doubling of the comment ID.

 In the trunk version of BP, the latest working copy version, function
 bp_blogs_record_comment() is located in a different place and these two
 code lines appear at 371 and 372.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2342>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list