[wp-trac] Re: [WordPress Trac] #8252: WXR import is broken and tags
are not imported for posts correctly
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 19 23:12:28 GMT 2008
#8252: WXR import is broken and tags are not imported for posts correctly
----------------------------------------------------+-----------------------
Reporter: kaankivilcim | Owner: tott
Type: defect | Status: closed
Priority: high | Milestone: 2.7
Component: Import | Version: 2.7
Severity: major | Resolution: fixed
Keywords: wxr import, tags, 2.7-beta3, has_patch |
----------------------------------------------------+-----------------------
Changes (by tott):
* keywords: wxr import, tags, 2.7-beta3, => wxr import, tags, 2.7-beta3,
has_patch
* status: assigned => closed
* resolution: => fixed
Comment:
the problem is caused by wp-includes/post.php line 1680.
{{{
$tags = array_map('trim', $tags);
}}}
This causes that arrays with tag_ids are converted to strings which then
get treated as tags by wp_set_object_terms.
I added a small helper function in function.php which returns the integer
instead of the trimmed string.
--
Ticket URL: <http://trac.wordpress.org/ticket/8252#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list