[wp-trac] [WordPress Trac] #30091: Comments cannot be created in scheduled posts (was: Comments is not created in planned posts)

WordPress Trac noreply at wordpress.org
Fri Oct 24 20:25:45 UTC 2014


#30091: Comments cannot be created in scheduled posts
--------------------------+------------------------------
 Reporter:  Hixon10       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:  4.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by socki03):

 I was able to replicate, but it doesn't seem to be a bug.  The post status
 object that gets returned has public and private set to false, which
 triggers this:
 {{{
 } elseif ( ! $status_obj->public && ! $status_obj->private ) {
         /**
          * Fires when a comment is attempted on a post in draft mode.
          *
          * @since 1.5.1
          *
          * @param int $comment_post_ID Post ID.
          */
         do_action( 'comment_on_draft', $comment_post_ID );
         exit;
 }
 }}}

 It appears to be intentional, or at least intentional in the case of
 posting a comment to a draft (or in this instance, scheduled).

 The action has nothing else built onto it in the core to handle it, so you
 see a white screen due to the exit.

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


More information about the wp-trac mailing list