[wp-trac] [WordPress Trac] #5460: WXR importer doesn't like XML files with </item><item>

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 1 13:33:41 UTC 2009


#5460: WXR importer doesn't like XML files with </item><item>
--------------------------+-------------------------------------------------
 Reporter:  JeremyVisser  |       Owner:  westi                  
     Type:  defect (bug)  |      Status:  accepted               
 Priority:  low           |   Milestone:  2.9                    
Component:  Import        |     Version:  2.8.4                  
 Severity:  minor         |    Keywords:  has-patch tested commit
--------------------------+-------------------------------------------------
Changes (by benz001):

 * cc: benz001 (added)
  * version:  2.3.1 => 2.8.4


Comment:

 Yes there is still interest!
 I've stumbled across this importing a hand-rolled minimal XML file in
 2.8.4, in my case the <item> nodes were in separate lines, but no other
 line breaks existed - hence the import failed eg

 {{{
 <item><category><![CDATA[surfaces]]></category><category domain="category"
 nicename="surfaces"><![CDATA[surfaces]]></category><title>Stainless Steel
 Surface (236 x 114cm) -1</title><content:encoded><![CDATA[<img href="wp-
 content/uploads/old/surfaces/IMG_6324.jpg" /><span>Stainless Steele
 Surface (236 x 114cm) <i>$80</i></span>]]></content:encoded></item>
 }}}
 FAIL


 {{{
 <item>
         <category><![CDATA[surfaces]]></category>
         <category domain="category"
 nicename="surfaces"><![CDATA[surfaces]]></category>
         <title>Grey Laminate Surface with stainless steel sides (246 x
 60cm)</title>
         <content:encoded><![CDATA[<img href="wp-
 content/uploads/old/surfaces/IMG_6326.jpg" /><span>Grey Laminate
 Surfacewith stainless steele sides (246 x 60cm)
 <i>$80</i></span>]]></content:encoded>
 </item>
 }}}
 PASS


 You can imagine how surprised I was at having to worry about whitespace in
 an XML file.
 Does the patch listed above cover this example?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/5460#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list