Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 2 months ago

#64199 closed defect (bug) (fixed)

"Slow down" message shown when updating Notes too quickly

Reported by: adamsilverstein's profile adamsilverstein Owned by: adamsilverstein's profile adamsilverstein
Milestone: 6.9 Priority: normal
Severity: normal Version: 6.9
Component: Notes Keywords: has-patch commit has-dev-note
Focuses: Cc:

Description

Change History (11)

#2 @adamsilverstein
3 months ago

  • Owner set to adamsilverstein
  • Status changed from new to assigned

Description

Originally reported in https://github.com/WordPress/gutenberg/issues/72892

When a Contributor with with notes by performing a few actions in quick succession, they can easily encounter the comment flood protection message of "You are posting comments too quickly. Slow down." message is displayed.

When the action being performed is submitting a reply or a new note, the action does not succeed. However if a note is being marked as resolved, the action is successful.

Since the comment flooding time frame is set to 15 seconds, it is really easy to hit that limit using the notes feature. This is working as expected, but Notes are a bit different so the same flooding prevention may not be appropriate.

Step-by-step reproduction instructions

  • Log in as a Contributor and create a post
  • Create two notes.
  • Reply to one.
  • Click resolve for that note.
  • Click resolve for the second one.
  • Comment and reopen one.
  • Observe comment flooding behavior.

Refresh page and notice that flood actions were prevented.

@adamsilverstein commented on PR #10448:


3 months ago
#3

@desrosj I updated the PR with an alternate approach, let me know what you think. I also created a matching Trac issue since we'll need to commit the fix there directly.

@adamsilverstein commented on PR #10448:


3 months ago
#4

I tried that originally (see first commits) before moving to the controller - which is the only place core calls that function. It's a bit cleaner this way.

@desrosj commented on PR #10448:


3 months ago
#5

Thanks all! I think this is looking good. As more ways to manage Notes are introduced, we can look at better ways to extract this into a better function/location.

#6 @adamsilverstein
3 months ago

  • Keywords commit added

#7 @adamsilverstein
3 months ago

The PR is approved, I'll work on getting this committed.

#8 @adamsilverstein
3 months ago

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

In 61144:

Editor: fix contributor "Slow down" message when updating Notes quickly.

Fix an issue where contributors’ notes edits were throttled. Notes are internal and from trusted users, they do not need throttling.

Skip calling wp_allow_comment for notes in WP_REST_Comments_Controller::create_item. As a result the pre_comment_approved hook is also not fired for notes.

Fixes https://github.com/WordPress/gutenberg/issues/72892 where the issue was originally reported.

Props adamsilverstein, desrosj, wildworks, mamaduka.
Fixes #64199.

#9 follow-up: @adamsilverstein
3 months ago

  • Keywords needs-dev-note added

maybe worth noting in a dev note that the pre_comment_approved hook is not called for noets.

#10 @desrosj
2 months ago

  • Component changed from Editor to Notes

Moving tickets related to the new Notes feature into the new Notes sub-component under Comments.

#11 in reply to: ↑ 9 @jorbin
2 months ago

  • Keywords has-dev-note added; needs-dev-note removed

Replying to adamsilverstein:

maybe worth noting in a dev note that the pre_comment_approved hook is not called for noets.

This is mentioned in the "Notes Permision" section of https://make.wordpress.org/core/2025/11/15/notes-feature-in-wordpress-6-9/

Note: See TracTickets for help on using tickets.