Opened 14 years ago
Closed 14 years ago
#16153 closed defect (bug) (duplicate)
Duplicate Category Titles Breaks Hierarchy on Export/Import
Reported by: | sottenad | Owned by: | duck_ |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.4 |
Component: | Export | Keywords: | |
Focuses: | Cc: |
Description
This issue is around how the export functionality handles hierarchical categories.
Since the wordpress exporter uses the "cat_name", or actual name of the parent category (not the slug/nicename) to define the category parent, if the same "cat_name" exists more than once in all the categories, there is no way for a child category to accurately determine which parent it's looking for.
For example: I make a category "Radios", and another category "TV's", and both of those categories have subcategories titled "Sony". The way the categories are related in the export file, there is no way of knowing if a category with a parent of "Sony" is a grandchild of "Radios" or "TV's".
Duplication instructions:
- Navigate to Posts -> Categories, in the WP-Admin panel of a fresh install of Wordpress 3.0.4.
- Create two new Categories, "Radios" and "Tv's"
- Create a new Category named "Sony", and make its parent "Radios"
- Create another new Category named "Sony", and make its parent "Tv's"
- Create a category named "Sony Radio", and make its parent the "Sony" that lives under "Radios"
- Create a category named "Sony TV", and make its parent the "Sony" that lives under "Tv's"
- Goto Tools -> Export, and click "Download Export File", using the default settings (each dropdown should say "All "+whatever)
- On a new, blank wordpress build, goto tools->import, then click the "wordpress" link and install the plugin needed to import.
- Import the file you just created in step 7
10 Visit Posts->Categories again, I see Only "Radios" and "TV's". Definitely not the structure I had exported
I would think that changing the <wp:category_parent> node to reference the "category_nicename" as opposed to the "cat_name" would clear the problem up.
Change History (3)
#1
@
14 years ago
- Keywords Categories Export Hierarchy Nesting removed
- Owner set to duck_
- Status changed from new to assigned
This may have been fixed in #15197 for 3.1.