[wp-trac] [WordPress Trac] #16153: Duplicate Category Titles Breaks Hierarchy on Export/Import
WordPress Trac
wp-trac at lists.automattic.com
Sat Jan 8 07:44:14 UTC 2011
#16153: Duplicate Category Titles Breaks Hierarchy on Export/Import
-------------------------+-------------------------------------------------
Reporter: sottenad | Owner:
Type: defect | Status: new
(bug) | Milestone: Awaiting Review
Priority: normal | Version: 3.0.4
Component: Export | Keywords: Categories, Export, Hierarchy,
Severity: critical | Nesting
-------------------------+-------------------------------------------------
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:'''
1. Navigate to Posts -> Categories, in the WP-Admin panel of a fresh
install of Wordpress 3.0.4.
2. Create two new Categories, "Radios" and "Tv's"
3. Create a new Category named "Sony", and make its parent "Radios"
4. Create another new Category named "Sony", and make its parent "Tv's"
5. Create a category named "Sony Radio", and make its parent the "Sony"
that lives under "Radios"
6. Create a category named "Sony TV", and make its parent the "Sony" that
lives under "Tv's"
7. Goto Tools -> Export, and click "Download Export File", using the
default settings (each dropdown should say "All "+whatever)
8. On a new, blank wordpress build, goto tools->import, then click the
"wordpress" link and install the plugin needed to import.
9. 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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16153>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list