Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13028 closed defect (bug) (duplicate)

Make sure a commenter doesn't receive a blank screen when comment is rejected

Reported by: solarissmoke Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Comments Keywords: dev-feedback has-patch
Focuses: Cc:


In the last few changes to wp-comments-post the following action hooks have been added ahead of the pre_comment_on_post action hook:

  • comment_on_trash
  • comment_on_draft
  • comment_on_password_protected

However, none of these hooks have default actions associated with them, which means that on a default install, if someone manages to post a comment on a trashed/draft/protected post, they get a blank screen without any explanation of what went wrong.

I think there should be some default actions here, or some default behaviour in between the action hook and the exit statements.

Proposed patch to follow.

Attachments (1)

default-behaviour-for-disallowed-comments.patch (1.1 KB) - added by solarissmoke 8 years ago.

Download all attachments as: .zip

Change History (4)

#1 @solarissmoke
8 years ago

xref #11286 for the 403 status header issue. There is no reason WP should return a 500 status error in these cases.

#2 @solarissmoke
8 years ago

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

Whoops, it looks like proposed patch for #11286 addresses these issues, so I'll just pursue this there.

#3 @nacin
8 years ago

  • Milestone 3.0 deleted
Note: See TracTickets for help on using tickets.