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

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 12 11:32:50 UTC 2011


#17115: Publishing an empty post results in success
----------------------------+-----------------------------
 Reporter:  kawauso         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.1
 Severity:  normal          |   Keywords:
----------------------------+-----------------------------
 '''Steps to reproduce:'''
 1. Go to Add New post screen
 1. Publish post
 1. Success message is displayed with link to initial auto-draft of post

 The issue can be traced back to the `editpost` switch case in `post.php`
 (line 204), which calls `edit_post()` and `redirect_post()`.

 `edit_post()` saves any meta values passed with the post to the auto-
 draft, which isn't necessarily desirable, and returns the auto-draft post
 ID.

 `redirect_post()` then defaults to status message code 6 which incorrectly
 reports success in publishing.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17115>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list