Publishing an empty post results in success
|Reported by:||kawauso||Owned by:|
|Component:||Posts, Post Types||Keywords:||has-patch|
Steps to reproduce:
- Go to Add New post screen
- Publish post
- 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.
Change History (22)
comment:18 nacin — 6 weeks ago
- Component changed from Administration to Posts, Post Types
- Focuses administration added