Ticket #4613 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Entities HTML causes problems in WXR Import !

Reported by: momo360modena Assigned to: westi
Priority: normal Milestone: 2.3
Component: Administration Version: 2.2.1
Severity: major Keywords: import, wxr, xml has-patch
Cc:

Description

I have a problem with importer.

If categories have entites HTML, as "&" or "&" in name During importing, Importer create "a zillion duplicate categories"

Because, in importer you clean title with

$categories[$cat_index] = $wpdb->escape($this->unhtmlentities(str_replace(array ('<![CDATA[', ']]>'), '', $category)));

And after the query return false...

Example : In DB you have Category NAME : 'Toto &amp; Blurps' In Query (l.319) : 'Toto & Blurps'

"SELECT cat_ID FROM $wpdb->categories WHERE cat_name = '$category'"

See patch for one possible solution. See XML for an example of the problem...

Attachments

fix_import.patch (0.7 kB) - added by momo360modena on 07/11/07 15:13:56.

Change History

07/11/07 15:13:56 changed by momo360modena

  • attachment fix_import.patch added.

07/11/07 19:58:12 changed by momo360modena

  • keywords changed from import, wsr, xml to import, wxr, xml.

08/09/07 19:08:14 changed by foolswisdom

  • milestone changed from 2.2.2 to 2.2.3.

08/14/07 17:14:37 changed by Nazgul

  • keywords changed from import, wxr, xml to import, wxr, xml has-patch.
  • milestone changed from 2.2.3 to 2.3 (trunk).

08/23/07 18:29:36 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.

I'll take a look at this.

Is it possible to have an example import file with the issue?

08/23/07 23:10:08 changed by ryan

The WP importer needs to be updated to use taxonomy and the sanitize term API.

08/24/07 14:44:27 changed by ryan

(In [5937]) Update WP importer to use taxonomy and query cat based on slug. see #4613

08/24/07 14:44:40 changed by ryan

Try that out.

09/20/07 20:46:21 changed by momo360modena

  • status changed from assigned to closed.
  • resolution set to fixed.