WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#13276 closed defect (bug) (fixed)

Comments don't work on private posts

Reported by: designsimply Owned by: nacin
Milestone: 3.0 Priority: high
Severity: major Version:
Component: General Keywords:
Focuses: Cc:

Description

If you try to leave a comment on a private post, it returns a blank white page at wp-comments-post.php and no comment data is saved.

Tested with r14468.

Change History (5)

comment:1 nacin4 years ago

Are you a super admin when doing this?

I ask because that is expected behavior if you don't have permissions to actually make said comment. So, if you live-edit HTML to make it seem like you're posting to another post ID, and that post ID is private, and you don't have permission to post a comment to that post, then you get a white screen. No error message cause it really isn't necessary.

Thus, super admin is my Q, because we might have some funky meta capability mapping we're not doing.

comment:2 iandstewart4 years ago

I can confirm this is happening with r14472 as an admin, not super-admin, user.

comment:3 nacin4 years ago

  • Milestone changed from Unassigned to 3.0
  • Owner set to nacin
  • Priority changed from normal to high
  • Severity changed from normal to major
  • Status changed from new to reviewing

comment:4 nacin4 years ago

Our logic in wp-comments-post.php that we added due to registration of post stati and post types is incorrect.

I'm working on this now.

comment:5 nacin4 years ago

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

(In [14473]) Allow comments on private posts to proceed past the comment_on_draft action and exit branch. We handle whether the commenter has the appropriate caps further down. fixes #13276.

Note: See TracTickets for help on using tickets.