Skip to:

Opened 8 years ago

Closed 7 years ago

#4806 closed defect (bug) (fixed)

Effort to prevent bumping in activity stream is too restrictive

Reported by: czarate Owned by: boonebgorges
Milestone: 1.8 Priority: normal
Severity: normal Version:
Component: Blogs Keywords: has-patch


The linked changeset, below, checks for an existing blog post activity stream item before creating a new one. In other words, it prevents a new activity stream item from being generated when a blog post is simply edited.

As part of this check, it compares author IDs. However, since BuddyPress blogs often have multiple authors, it fails when the editor is distinct from the original author. Comparing author IDs is superfluous anyway, since blogid+postid is sufficient to identify a post. (Unless I'm missing something.)

I believe simply removing line 191 (buddypress-1.6.3) from bp-blogs/bp-blogs-functions.php will correct the issue.

'user_id' => (int)$post->post_author,


Change History (4)

#1 @boonebgorges
8 years ago

  • Component changed from Core to Blogs
  • Milestone changed from Awaiting Review to 1.7

This needs some review (and some unit tests would be nice) but I agree that it's probably unnecessary to do an author ID check. Moving to 1.7, but can be punted if it no one can write the tests.

#2 @DJPaul
8 years ago

  • Milestone changed from 1.7 to Future Release

#3 @boonebgorges
7 years ago

  • Keywords has-patch added
  • Milestone changed from Future Release to 1.8

#4 @boonebgorges
7 years ago

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

In 7169:

When checking for previous new_blog_post entries to prevent bumping, skip the author ID check

The author ID check is superfluous - post_id and blog_id is sufficient to
identify a unique activity item corresponding to a specific post. Moreover, the
additional check breaks the intended functionality when the post is edited to
have a new author.

Fixes #4806

Props czarate

Note: See TracTickets for help on using tickets.