WordPress Importer duplicates categories
|Reported by:||briancolinger||Owned by:|
|Severity:||normal||Keywords:||has-patch needs-unit-tests early|
The WordPress importer duplicates categories.
This only seems to affect child categories.
To reproduce, get an export file that has parent and children categories. Run the importer multiple times with the same file.
View the category screen under Posts->Categories, you should see duplicated child categories.
I've included a patch for the process_categories() method that fixes this by explicitly checking if each category_exists().
I've included the same patch for process_tags() method. Tags do not duplicate, but wp_insert_term() is called without checking if the tag exists.
Change History (9)
- Keywords has-patch added; duplicate categories, wordpress importer removed