[wp-trac] [WordPress Trac] #27896: wordpress-importer's lack of understanding of XML Namespaces causing compatibility issues

WordPress Trac noreply at wordpress.org
Mon Jun 9 15:25:00 UTC 2014


#27896: wordpress-importer's lack of understanding of XML Namespaces causing
compatibility issues
--------------------------+------------------------------
 Reporter:  tomdxw        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Import        |     Version:  3.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by tomdxw):

 * keywords:   => has-patch


Comment:

 SimpleXML actually seems to support namespaces. If you add some calls to
 $xml->registerXPathNamespace() it prevents the "does not appear to be a
 WXR file" message from appearing. And then if you update the namespaces it
 actually imports content (the 1.2 namespaces are what are currently
 produced by WordPress' built-in exporter).

 Here's a patch:

 https://gist.github.com/tomdxw/ca851f05b088165e25bd

 (This may or may not break importing from XML using the 1.1 namespaces, I
 haven't tested).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27896#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list