Skip to:
Content

bbPress.org

Opened 3 years ago

Closed 3 years ago

Last modified 8 months ago

#3032 closed defect (fixed)

Toggle functionality introduces race conditions with multiple moderators

Reported by: johnjamesjacoby Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.0
Component: API - Moderation Keywords: commit
Cc: jmdodd@…

Description

When multiple moderators are toggling topics, it's possible for two toggle requests to go in back-to-back, undoing the original toggle.

Talking with @jmdodd this weekend at WCUS, we came up with a series of improvements to bbPress that will allow us to keep the toggle idea for core, but allow others to introduce new toggles and/or approaches to the API.

This ticket will serve as the place where those changes will go, for forums/topics/replies.

Change History (13)

#1 @johnjamesjacoby
3 years ago

In 6133:

Moderation: First pass at improved reply toggle actions:

  • Allow custom toggles, or replacement of existing toggles with new procedures
  • Introduce a handful of actions & filters to enable the above
  • Separate functionality into smaller, more manageable parts.

See #3032. (Forums & Topics @todo)

#2 @johnjamesjacoby
3 years ago

In 6134:

Moderation: Rename function to bbp_get_reply_toggles() to better match existing naming scheme.

See #3032.

#3 @jmdodd
3 years ago

  • Cc jmdodd@… added

#4 @johnjamesjacoby
3 years ago

In 6136:

Moderation: Move sub_action query var into a passable argument, so all actions can have reliable sub-action usage.

See #3032.

#5 @johnjamesjacoby
3 years ago

In 6137:

Moderation: Pass $reply_id into bbp_get_reply_toggles() so the exacty reply ID can be referenced directly at the time of the filter.

See #3032.

#6 @johnjamesjacoby
3 years ago

In 6138:

Moderation: Add error message if reply could not be found or no longer exists.

See #3032.

#7 @johnjamesjacoby
3 years ago

In 6139:

Moderation: /s/exists/missing

See #3032.

#8 @johnjamesjacoby
3 years ago

In 6142:

Moderation: First pass at improved topic toggle actions:

  • Allow custom toggles, or replacement of existing toggles with new procedures
  • Introduce a handful of actions & filters to enable the above
  • Separate functionality into smaller, more manageable parts.

See #3032. (Forums @todo)

#9 @johnjamesjacoby
3 years ago

In 6143:

Topics: Break apart some lengthy inline conditions. See #3032.

#10 @netweb
3 years ago

In 6146:

Moderation: Add some missing PHPDoc @since revisions

See #3032.

#11 @johnjamesjacoby
3 years ago

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

This seems resolved. Let's refer to this in new tickets as issues are discovered.

Thanks everyone!

This ticket was mentioned in Slack in #bbpress by netweb. View the logs.


3 years ago

#13 @johnjamesjacoby
8 months ago

Assigning all closed & unassigned tickets in the 2.6 milestone to myself.

Note: See TracTickets for help on using tickets.