[wp-trac] [WordPress Trac] #39650: Commenting on a draft post results in blank page

WordPress Trac noreply at wordpress.org
Wed Jan 25 15:39:11 UTC 2017


#39650: Commenting on a draft post results in blank page
-----------------------------------------------------+------------------
 Reporter:  sumitbagthariya16                        |       Owner:
     Type:  defect (bug)                             |      Status:  new
 Priority:  normal                                   |   Milestone:  4.8
Component:  Comments                                 |     Version:
 Severity:  normal                                   |  Resolution:
 Keywords:  has-patch needs-unit-tests dev-feedback  |     Focuses:
-----------------------------------------------------+------------------
Changes (by swissspidy):

 * keywords:  has-patch => has-patch needs-unit-tests dev-feedback


Comment:

 Seems like you guys should work together / coordinate on who's updating a
 patch :-)

 [attachment:39650.4.patch] is not needed. That would be to big of a
 change. Adding the message argument to the `WP_Error` object automatically
 displays that message when posting the comment. That's why the `exit;`
 there is just fine as-is.

 [attachment:39650.5.patch] does not need to touch `wp-comments-post.php`
 either. Also, why adding the error message to every `WP_Error` object and
 not just on `comment_on_draft` (the original scenario described in the
 ticket)?

 The error message should probably only be shown if the user has the
 capability to read the post, so a `current_user_can()` check seems to be
 needed.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39650#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list