[wp-trac] [WordPress Trac] #40689: Posting comment on draft post just gives a white page

WordPress Trac noreply at wordpress.org
Sun May 7 21:41:47 UTC 2017


#40689: Posting comment on draft post just gives a white page
-------------------------+-----------------------------
 Reporter:  floriansw    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Comments     |    Version:  4.7.4
 Severity:  normal       |   Keywords:
  Focuses:  ui           |
-------------------------+-----------------------------
 If a blog post is in state "draft" and it is viewed as a preview on the
 blog, the comment box is already there. If the user then enters a comment
 and clicks "Submit", the user get's a white page only. This is because of
 the returned error does not contain any message:
 {{{#!php
 object(WP_Error)#8374 (2) { ["errors"]=> array(1) { ["comment_on_draft"]=>
 array(1) { [0]=> string(0) "" } } ["error_data"]=> array(0) { } }
 }}}

 and the wp-comment-post.php script simply exits in this case:
 https://github.com/WordPress/WordPress/blob/master/wp-comments-
 post.php#L26-L33

 Ideally, WP should give a proper error message, which indicates, why the
 comment could not be saved.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40689>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list