Opened 8 years ago
Closed 8 years ago
#40689 closed enhancement (duplicate)
Posting comment on draft post just gives a white page
Reported by: | floriansw | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7.4 |
Component: | Comments | Keywords: | |
Focuses: | ui | Cc: |
Description
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:
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.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Thanks for the report, @floriansw.
This was actually fixed in WordPress 4.8, which will be released in June. You can try the beta yourself if you want to help test it.
See #39650