[wp-trac] [WordPress Trac] #5330: wxr import inserts tags with
numbers instead of names
WordPress Trac
wp-trac at lists.automattic.com
Fri Nov 9 02:42:57 GMT 2007
#5330: wxr import inserts tags with numbers instead of names
------------------------+---------------------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5
Component: General | Version:
Severity: normal | Keywords:
------------------------+---------------------------------------------------
The wp importer incorrectly inserts tags with the term ID number in place
of its name. The first post with that tag works fine, but subsequent
posts get bogus numeric tags instead.
It seems to be a simple type issue, numeric string vs int. The enclosed
patch fixes it in the importer, but the same issue might affect other code
also. Perhaps the fix belongs at a lower level, in wp_set_object_terms()
or is_term() (I think the is_int() check in is_term() is the root cause).
Reproduced in unit testing:
http://svn.automattic.com/wordpress-tests/wp-testcase/test_import_wp.php
{{{
There was 1 failure:
1) test_all_posts(TestImportWP)
Failed asserting that two strings are equal.
expected string <Tag A>
difference <xx???>
got string <11>
/home/zem/projects/wordpress/wordpress-tests/wp-
testcase/test_import_wp.php:82
/home/zem/projects/wordpress/wordpress-tests/wp-testlib/base.php:330
/home/zem/projects/wordpress/wordpress-tests/wp-test.php:91
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/5330>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list