Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#5014 closed defect (bug) (fixed)

Admin > Activity Stream Reply to Activity in Hidden Group Does Not Show up in Front End

Reported by: mercime's profile mercime Owned by: boonebgorges's profile boonebgorges
Milestone: 1.9 Priority: high
Severity: normal Version:
Component: Activity Keywords:
Cc:

Description

BP trunk-7092, WP 3.6 beta 3, Single WP install

Checked out report of user at http://buddypress.org/support/topic/admin-activity-stream-replies-not-posting-to-group-activity/

Confirmed the issue posted by user. To replicate:

  • Change privacy level of a Group from Public to Hidden in front end
  • Posted Status Update as Super Admin in that now Hidden Group which I was not a member of
  • Went to Admin > Activity Stream and Replied to the status update posted in Hidden group
  • Reply shows up in Admin > Activity Stream but not in front end of the Hidden Group's Activity Stream.

Beyond the issue posted:

  • In Admin > Activity Sream, in the row of my reply to the status updete, the column "in response to" incorrectly shows response to a user, and not to the said post update activity.
  • Related: when I click on the View Activity link in Admin > Activity Stream under that incorrect user's avatar, I am brought to my profile page http://example.com/members/mercime/ with error warning in my member header area "You do not have access to this activity."

Note: No issue so far when replying to public group activities from Admin > Activity Stream

Change History (3)

#1 @DJPaul
11 years ago

  • Milestone changed from Awaiting Review to 1.8

Not sure if a regression, but putting in 1.8 for further review.

#2 @boonebgorges
11 years ago

  • Milestone changed from 1.8 to 1.9
  • Priority changed from normal to high

I've confirmed the problem.

The root issue is that the AJAX callback bp_activity_admin_reply() is using the incorrect values for activity_id. It's using the root_id params being passed in the AJAX request, which is in turn defined in BP_Activity_List_Table::single_row() http://buddypress.trac.wordpress.org/browser/tags/1.7.2/bp-activity/bp-activity-admin.php#L1110. The new activity comment is being created using the parent's item_id as the *reply's* root activity id, which is incorrect.

It appears that this bug is actually breaking *all* activity replies, not just those in hidden groups. All replies created from the admin are being attached to the incorrect parent. It's just particularly noticeable in the case of hidden groups, because hidden group activity cannot be easily viewed elsewhere in the interface.

It looks like the easiest fix is to modify the logic in single_row() so that the data-root_id attribute is set to $item['id'] if the activity item is not an activity comment.

But this needs testing, and the behavior described here is not a regression. I'm going to move it to 1.9.

#3 @boonebgorges
11 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7579:

Use the correct root_id when composing the activity Admin screen

Activity comments have the root_id of the root parent item, while non-comments
have their own ID as the root_id. Setting this value correctly ensures that the
correct data is sent with AJAX comment creation, which in turn ensures that
comments are associated with the correct activity item.

Fixes #5014

Note: See TracTickets for help on using tickets.