[wp-trac] [WordPress Trac] #25127: Saving an empty draft sticky post leads to auto-drafts being marked as sticky

WordPress Trac noreply at wordpress.org
Fri Aug 23 23:01:45 UTC 2013


#25127: Saving an empty draft sticky post leads to auto-drafts being marked as
sticky
----------------------------+-----------------------
 Reporter:  druesome        |       Owner:
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  3.7
Component:  Administration  |     Version:  3.6
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+-----------------------
Changes (by nofearinc):

 * cc: mario@… (added)
 * keywords:  needs-patch => has-patch


Comment:

 The problem is that `wp_insert_post` breaks earlier when an empty post has
 been found and assigned as true to the `$maybe_empty` variable. Initially,
 a post has a status of `auto-draft` which isn't updated to `draft` unless
 there is any valid data in the title or content.

 IMO this makes sense and also happens when you skip step 2 (i.e. just hit
 'Save Draft' for an empty post).

 My proposal is just counting the sticky posts properly by ignoring `auto-
 draft` posts as well.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25127#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list