[wp-trac] [WordPress Trac] #22167: Categories revert to default when scheduled posts are published

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 11 17:15:04 UTC 2012


#22167: Categories revert to default when scheduled posts are published
-----------------------------+-----------------------------
 Reporter:  danielbachhuber  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  major            |   Keywords:
-----------------------------+-----------------------------
 The issue is that a scheduled post's categories are dropped when it's
 published. check_and_publish_future_post() calls wp_publish_post():

 http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L2882

 which, in turn, gets a WP_Post object, changes the status, can calls
 wp_insert_post():

 http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L2863

 but, because post_category isn't a part of the WP_Post object, the
 categories default to default

 r21942 seems to be the culprit. This is reproducible on wpcom and in
 trunk.

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


More information about the wp-trac mailing list