[wp-trac] [WordPress Trac] #39650: Commenting on a draft post results in blank page (was: Display blank page when post status is draft)
WordPress Trac
noreply at wordpress.org
Wed Jan 25 11:58:27 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: needs-patch | Focuses:
-------------------------------+------------------
Changes (by swissspidy):
* keywords: has-patch => needs-patch
* version: 4.7.1 =>
Comment:
What @dhanendran said. Also, the code would need somebrackets to follow
the [https://make.wordpress.org/core/handbook/best-practices/coding-
standards/php/ WordPress PHP coding standards].
However, I don't think hiding the comment form for draft posts is the
ideal solution here. Allowing comments on drafts might be desirable under
some circumstances (live previews in the customizer, REST API, etc. See
also #19739).
Instead of a blank page there should be an actual ''error message''. This
means changing `wp_handle_comment_submission()` accordingly, where there's
currently this line: `return new WP_Error( 'comment_on_draft' );` (note
the lack of error message).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39650#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list