[wp-trac] [WordPress Trac] #8877: dotclear import don't set the post category

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 17 22:05:20 GMT 2009


#8877: dotclear import don't set the post category
--------------------------+-------------------------------------------------
 Reporter:  olivM         |       Owner:       
     Type:  defect (bug)  |      Status:  new  
 Priority:  high          |   Milestone:  2.7.1
Component:  Import        |     Version:       
 Severity:  normal        |    Keywords:       
--------------------------+-------------------------------------------------
 when importing from dotclear, all the posts are set only to the default
 category.

 i think the problem is due to the fact that wp_set_post_categories do
 nothing if we pass it only one category (don't know why...)

 ( in /wp-admin/import/dotclear.php, line 479 )
 {{{
                                 // Make Post-to-Category associations
                                 $cats = array();
                                 $category1 =
 get_category_by_slug($post_cat_name);
                                 $category1 = $category1->term_id;
 }}}

 should be
 {{{
                                 // Make Post-to-Category associations
                                 $cats =
 array(get_option('default_category'));
                                 $category1 =
 get_category_by_slug($post_cat_name);
                                 $category1 = $category1->term_id;

 }}}

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


More information about the wp-trac mailing list