Search

Oooh, does this put an end to us having to use the "unstable" branch?

Wow, that's perfect timing! Thanks a lot for this update, Rowan.

Oh, now that's just brilliant. I can't wait to get this working on 2.2!

Is the master branch now the stable one?

Awesome, cheers Rowan! I'll try this out tonight.

Thank you for taking the time to update this extension, Rowan. This was the main thing holding me back from Symphony 2.2. Looking forward to trying it out!

Awesome! What about the poor chaps who're still using 2.1.2? Cherry-pick 07d892, right?

Rowan, it seems like the XML Importer interface doesn't check Automatically discover namespaces if it is set in the importer file.

Nils, it's meant as a one time operation. It probably shouldn't be in the importer file, and it should probably be a button.

Ah, right! The concept makes sense but the interface doesn't. A button seems to be a good choice.

Upgraded Symphony 2.2 which I had an old version of XMLImporter installed. Then I updated XML Importer to 1.0, and when I click on the XMLImporter menu item it goes to a blank page. I've tried uninstalling the XMLImporter extension and then re-enabling it, and still it goes to a blank page.

Is anyone else experiencing this?

it goes to a blank page

Enable PHP errors and you may see the cause of the error.

I'm getting this PHP error...

Fatal error: Cannot call constructor in /Users/myaccount/Sites/public_html/site.local/public/workspace/xml-importers/xml-importer.budgetimporter.php on line 7

Have a look at Rowan's note above:

Notes

This release of the extension requires you manually modify your importers slightly, remove the following lines:

public function construct(&$parent) {
parent::
construct($parent);
}

http://getsymphony.com/discuss/thread/36868/12/#position-240

@buzzomatic, @nickdunn, and @Nils - That was it! I'm so sorry that I missed Rowan's note.

I'm in the need of an JSON importer which is actually doing exactly what this extensions does. The only difference is that instead of an XML file/feed I'd like use a JSON response of an external API as source.

What's the best idea?

  • Creating a new extension, JSON Importer, which is more or less a copy of this extension.
  • Forking and extending XML Importer allowing JSON sources.

What do you think?

You could also create a simple JSON-to-XML PHP script and feed its result to the importer.

What's the advantage beside talking XML? If I have an external API that returns a - normally documented – JSON object why should I translate it first when I can import it directly? As it's about importing data into the database and not about templating I don't see any advantages in using XML as a middleman.

PS: Maybe I should move this to a separate discussion.

Does xml importer support image fields?

I have the images uploaded over ftp to : /workspace/uploads/photos/

then I'm referencing these with an xml which looks like this:

<channel>
<item>
<title>My Cool Image</title>
<description>Wicked times</description>
<image>/workspace/uploads/photos/image.jpg</image>
<albums><album>My Album</album></albums>
</item>
</channel>

every time I run the importer it comes back with:

The file uploaded is no longer available. Please check that it exists, and is readable.

any idea where it might be going wrong? I cannot seem to be able to locate the file handeling in the code either.

any help would be great.

Thanks!

@jonasd did you solve the problem jet?

I have the same problem. When I create a new Importer I see the green success message on top of the page XML Importer created at 23:28 but when I go the the overview page I see the next error.

 * 86:                         if ($about = $this->about($file)) {
 * 87:                             $classname = $this->__getClassName($file);
 * 88:                             $path .= "/xml-importer.{$name}.php";
 * 89:                             
 * 90:                             $about['handle'] = $file;
 * 91:                             $about['for-each'] = @call_user_func(array(&$classname, 'getRootExpression'));
 * 92:                             
 * 93:                             $result[] = $about;
 * 94:                         }
 * 95:                     } 

Backtrace

 * [:0] GenericErrorHandler::handler();
 * [/home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/extensions/xmlimporter/lib/class.xmlimportermanager.php:91] call_user_func();
 * [/home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/extensions/xmlimporter/extension.driver.php:77] XMLImporterManager->listAll();
 * [/home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/extensions/xmlimporter/content/content.importers.php:663] Extension_XmlImporter->getXMLImporters();
 * [/home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/extensions/xmlimporter/content/content.importers.php:43] contentExtensionXmlImporterImporters->__prepareIndex();
 * [/home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/symphony/lib/core/class.administration.php:221] contentExtensionXmlImporterImporters->build();
 * [/home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/symphony/lib/core/class.administration.php:374] Administration->__buildPage();
 * [/home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/index.php:25] Administration->display();

Anyone suggestions?

@whgdesign, did you upgrade from an older Symphony (with previous importers) to 2.2? If so, you have to manually modify the existing importers as Rown describes here.

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