Search

I am trying to use the XML Importer extension to pull in data from a Wordpress install. I used the Wordpress export XML option. I am trying to access the node <dc:creator> and I have used the 'automatically detect namespaces option so dc is listed:

name: dc | uri: http://purl.org/dc/elements/1.1/

Along with 4 other namespaces that were automatically added too.

I am trying to import the dc:creator into my Author field with a helper function that converts the value in the field into an Author id. When I run the importer, I get this error:

Symphony Warning: DOMDocument::loadXML(): Namespace prefix dc on creator is not defined in Entity, line: 5

An error occurred in /var/www/vhosts/pb.test/httpdocs/extensions/xmlimporter/content/content.importers.php around line 191

187                         if(is_null($entry->ownerDocument)) {
188                             $xml->loadXML($entry->saveXML());
189                         }
190                         else {
191                             $xml->loadXML($entry->ownerDocument->saveXML($entry));
192                         }
193
194                         $source = htmlentities($xml->saveXML($xml->documentElement), ENT_COMPAT, 'UTF-8');

Any pointers or advice on how to get around this one? I don't know much about namespaces or how the XML Importer uses them.

Thanks for reading.

I encountered the same issue. It turns out that the xml file exported by Wordpress is invalid (something with the CDATA tags perhapshttps://code.google.com/p/google-blog-converters-appengine/issues/detail?id=45#c9). I went directly into the wordpress database via phpmyadmin and run a query like SELECT * FROMwppostsWHEREposttype= "post" then exported the query results to an XML file. Try the import again in symphony with the new, valid xml file.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details