[wp-trac] Re: [WordPress Trac] #4040: WXR importing duplicates
categories
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 6 01:14:41 GMT 2007
#4040: WXR importing duplicates categories
----------------------------+-----------------------------------------------
Reporter: takayukister | Owner: anonymous
Type: defect | Status: new
Priority: low | Milestone: 2.2
Component: Administration | Version: 2.2
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+-----------------------------------------------
Comment (by takayukister):
[http://trac.wordpress.org/browser/trunk/wp-admin/admin-
db.php?rev=5184#L262 category_exists()] depends on category_nicename to
check existence of category. And it uses sanitize_title(cat_name) to get
the category_nicename.
Under the example described above, sanitize_title("書評") returns
"%e6%9b%b8%e8%a9%95" and because there's been no category with
category_nicename "%e6%9b%b8%e8%a9%95" ever, another 書評 category
(cat_ID:4) is created.
My patch uses cat_name instead of category_nicename to check category
existence.
--
Ticket URL: <http://trac.wordpress.org/ticket/4040#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list