Opened 4 years ago
Last modified 12 months ago
#8877 accepted defect (bug)
dotclear import don't set the post category — at Initial Version
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | WordPress.org |
| Component: | Import | Version: | |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
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;
Note: See
TracTickets for help on using
tickets.
