Skip to:
Content

bbPress.org

Opened 5 years ago

Last modified 4 years ago

#3328 assigned defect (bug)

BuddyPress activity update not working when editing topic or replies

Reported by: michael8888's profile michael8888 Owned by: r-a-y's profile 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
Cc:

Description

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 5 years ago.
3328.2.patch (16.0 KB) - added by johnjamesjacoby 4 years ago.

Download all attachments as: .zip

Change History (5)

#1 @r-a-y
5 years 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 r6696.

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 r6696 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...

Last edited 5 years ago by r-a-y (previous) (diff)

@r-a-y
5 years ago

#2 @johnjamesjacoby
4 years 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
4 years ago

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