WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Importer
Importer not retaining Category architecture (4 posts)

  1. w3prodigy
    Member
    Posted 3 years ago #

    Exported from WP 2.9.2 for import into WP 3.0

    After importing 12.2 MB file successfully (without any issues) I checked the posts in the system. The category relations fell apart, child categories no longer have parents and are listed as their own parent.

    I'm willing to assist with resolving the problem.

    http://wordpress.org/extend/plugins/wordpress-importer/

  2. w3prodigy
    Member
    Posted 3 years ago #

    After doing some research it looks like this issue is due to categories and tags containing the same slug... however, this could be a completely separate issue

  3. thirzah
    Member
    Posted 3 years ago #

    I'm losing structure too and don't have any tags at all :)
    However, I do have multiple categories with the same 'name' but different slugs (e.g., I have "West Midlands" as both a 'region' and a 'county' in my hierarchy, with west-midlands and west-midlands-2 as the slugs.

    I can see two places where the export/import is likely failing:
    1) in the exported xml, <wp:category_parent> does not use the slug of the parent, but its name. e.g.
    <wp:category_parent>West Midlands</wp:category_parent>

    2) in the import, looks like there's a check to see if a category exists before importing it... using its name:

    // If the category exists we leave it alone
    	if ( in_array($cat_name, $cat_names) )
    	 continue;

    However, I might be wrong on both counts :)

  4. c_wayne
    Member
    Posted 3 years ago #

    I'm having the same problem too.

    It looks like the import process re-creates the category list rather than actually importing the data. If there are two categories with the same name they are interpreted as a single category and the posts are consolidated.

    Perhaps there is a work-around or else each category needs a unique name.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic