[wp-trac] [WordPress Trac] #17115: Publishing an empty post results in success

WordPress Trac noreply at wordpress.org
Wed Jun 29 11:41:33 UTC 2016


#17115: Publishing an empty post results in success
------------------------------------+------------------------------
 Reporter:  kawauso                 |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Posts, Post Types       |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  administration
------------------------------------+------------------------------

Comment (by stephenharris):

 @GhostToast You raise a good point, `$maybe_empty` will only be set to
 true if the post type supports excerpt, title AND content. But that's not
 the issue here. A post ''does'' support all three of those. The issue here
 is that the error of an 'empty' post type is log inside `edit_post()` - it
 will ''always'' return the post ID, so the calling code can't detect an
 error to act accordingly.

 Current patches take the approach of preventing the user of even being
 able to publish an 'empty'  post. The problem with such an approach is as
 @dnaber-de describes.

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


More information about the wp-trac mailing list