Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#5792 closed defect (bug) (fixed)

Activity Stream bug when updating posts

Reported by: rossagrant's profile rossagrant Owned by: imath's profile imath
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Blogs Keywords: has-patch commit
Cc:

Description

Hi guys,

I've been building a massive new BP site so have been testing stuff thoroughly and think I've found a couple of bugs.

The first one can be replicated by:

  • post a new post with an image at the top of it.
  • you'll see that all shows well in the activity stream with a thumbnail of the post and a bit of excerpt.
  • go back to the post editor as if you were making a change to the post and click 'update'.
  • you'll see the activity stream item changes hugely. It effectively now just places the entire post in the activity item?

I've tested in BP 2.0.1 with NO PLUGINS and in BP-DEFAULT.

Could someone verify this behaviour for me?

Thank :)

Attachments (1)

5792.patch (914 bytes) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (6)

#1 follow-up: @DJPaul
10 years ago

imath, please can you look sometime at this? It sounds like it might be related to how the heartbeat updates are rendered, and would value your opinion as you've been near this code recently. Thanks.

#2 in reply to: ↑ 1 @imath
10 years ago

Replying to DJPaul:

imath, please can you look sometime at this?

I'm on it, bbl

#3 @imath
10 years ago

  • Component changed from Activity to Blogs
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.1

Thanks rossagrant for your feedback. I confirm the issue.

But the issue is not related to HeartBeat, by the way i'm not sure BP Default is supporting it.

The problem is located in bp_blogs_update_post() where we simply set the activity content to post->content

I'm suggesting 5792.patch which would make sure:

  • the thumbnail is updated
  • the excerpt is the same than the one used in bp_blogs_record_activity()

What do you think ?

@imath
10 years ago

#4 @DJPaul
10 years ago

  • Keywords commit added

As you've copied the change from bp_blogs_record_activity, I think this is fine.

#5 @imath
10 years ago

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

In 8929:

Make sure the updated activity after a post update is consistent with the initial activity.

In Blogs component, when recording a new_blog_post" update, bp_activity_thumbnail_content_images() and bp_create_excerpt() are used to build the content of the activity. After a updating the post from the dashboard, bp_blogs_update_post() was simply updating the activity with the entire post content.

bp_blogs_update_post() is now using the same functions than bp_blogs_record_activity() to update the content of the activity.

Fixes #5792

Note: See TracTickets for help on using tickets.