Skip to:

Opened 22 months ago

Last modified 10 months ago

#3328 assigned defect

BuddyPress activity update not working when editing topic or replies

Reported by: michael8888 Owned by: r-a-y
Milestone: Under Consideration Priority: normal
Severity: normal Version: 2.6.0
Component: Extend - BuddyPress Keywords: has-patch needs-testing reporter-feedback dev-feedback


If you edit a bbpress topic or reply the corresponding BuddyPress activity entry is not updated. The bug is in includes/extend/buddypress/activity.php lines 507, 645.

Even if revisions are enabled !post_type_supports( bbp_get_reply_post_type(), ‘revisions’ ) is true.

Attachments (2)

3328.01.patch (659 bytes) - added by r-a-y 20 months ago.
3328.2.patch (16.0 KB) - added by johnjamesjacoby 10 months ago.

Download all attachments as: .zip

Change History (5)

#1 @r-a-y
20 months ago

  • Keywords has-patch added; needs-patch removed
  • Version changed from 2.6.3 to 2.6.0

I can confirm this bug. The revisions check was added in r6656.

The problem with using post_type_supports( BBP_POST_TYPE, 'revisions' ) on the 'edit_post' hook is it always returns false due to the usage of remove_post_type_support( BBP_POST_TYPE, 'revisions' ) in r4426.

I'd probably recommend removing the post_type_supports( BBP_POST_TYPE, 'revisions' ) check on lines 507 and 645 to solve this problem. See 01.patch.

The other issue with r6656 is if revisions is disabled from the admin settings page, forum edits can no longer trigger activity item creation if the activity item wasn't created to begin with. This used to work in bbPress 2.5, so this might be an oversight...

Version 1, edited 20 months ago by r-a-y (previous) (next) (diff)

20 months ago

#2 @johnjamesjacoby
10 months ago

  • Keywords needs-testing reporter-feedback dev-feedback added
  • Owner set to r-a-y
  • Status changed from new to assigned

Revised patch reverts r6696, audits how revisions are toggled (and avoided) and attempts to smooth that behavior out and make it all a bit more DRY.

A new bbp_update_post_without_revision() function will call wp_update_post() but removing and re-adding revisions support so that it does not impact subsequent function calls in the current process.

This feels a little better to me, but is a bigger change and would benefit from additional testing.

#3 @johnjamesjacoby
10 months ago

  • Milestone changed from Awaiting Review to Under Consideration
Note: See TracTickets for help on using tickets.