[wp-trac] [WordPress Trac] #4040: WXR importing duplicates categories

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 28 06:19:38 GMT 2007


#4040: WXR importing duplicates categories
----------------------------+-----------------------------------------------
 Reporter:  takayukister    |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  low             |   Milestone:  2.4      
Component:  Administration  |     Version:  2.2      
 Severity:  normal          |    Keywords:  has-patch
----------------------------+-----------------------------------------------
 In admin panel [Manage] - [Import], importing WordPress eXtended RSS (WXR)
 incorrectly generate duplicated categories with same cat_name.

 For example, this occurs under condition below.

 At exporting:

 ||''cat_ID''||''cat_name''||''category_nicename''||
 ||3||書評||book-review||

 (書評 means book review in Japanese.)

 And after importing this WXR file, categories will look like below.

 ||''cat_ID''||''cat_name''||''category_nicename''||
 ||3||書評||book-review||
 ||4||書評||%e6%9b%b8%e8%a9%95||

 Two 書評 categories are generated. One has original "book-review" nicename
 and another has "%e6%9b%b8%e8%a9%95" which is sanitized string of "書評".
 And all posts in 書評 category belongs to 書評 category of
 "%e6%9b%b8%e8%a9%95".

 It seems that this duplication occurs only when a category has
 category_nicename which is not equal to sanitized cat_name.

 For easy reproducing of this behavior, I'll attach example WXR file. And
 I'll attach a patch for this.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4040>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list