Opened 16 years ago
Closed 15 years ago
#8840 closed defect (bug) (fixed)
WRX Import does not import category description
Reported by: | ose | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Import | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
When exporting a wordpress blog, category descriptions are stored in the resulting XML file. However, upon import, they are not re-imported. As such a full-circle export-import is not possible.
While the default theme does not use category descriptions, other themes do use it and this bug does limit the usefulness of the import feature. This has been reported by others in the support forums in the past (http://wordpress.org/support/topic/175488 and http://wordpress.org/support/topic/150223).
This is also a problem when migrating from another blog system or CMS (in my case) via WXR files.
To reproduce:
Create a category with a description in wordpress
Export to WRX file
Import WRX file into empty blog.
Result: Category will be imported, but category description will be missing.
It seems like there is an easy patch for this:
In wp-admin/import/wordpress.php,
function process_categories() {
...
$category_nicename = $this->get_tag( $c, 'wp:category_nicename' );
$category_description = $this->get_tag( $c, 'wp:category_description' );
...
catarr = compact('category_nicename', 'category_parent', 'posts_private', 'links_private', 'posts_private', 'cat_name', 'category_description');
...
I tried this in a local install and it works fine for me by adding the extra line and adding category_description to the compact call.
Can someone please verify and possibly apply this patch?