Right-o. I must admit I haven’t used XML Importer since its first release so it’s changed a bit since I worked on it. Rowan is the man here.

Rowan is the man here.

Okay, so I’ll wait until the southern hemisphere wakes up again :)

That’s a bug I fixed here:

Incorporating this fix was what enabled me to run my (hacked) importer, but that hasn’t solved the problem of not being able to edit or create importers using the field editing in symphony

I can’t get this to work. It won’t save any of my xpaths upon save. I noticed that Nick raised this as an issue before which is stated to be fixed. Also, I’ve read the instruction document on the github, but the importer doesn’t match it??

Am I missing something?

Could it not be made to import from a datasource? Wouldn’t that take some of the pain out of it? Or am I barking up the wrong tree…

I think I would really like this to work. I tried editing the importer file itself and decided that I best wait until the GUI is fixed :)

What version of Symphony are you using it with? What errors do you get? Have you pulled the latest changes from git?

I pulled Rowan’s latest changes, and I’m getting…

Import Failed

No data to import.
DOMDocument::loadXML() [domdocument.loadxml]: Empty string supplied as input
No entries to import.

I know my xml file is there… I’ve checked my url out and it pulls up fine.

It think it’s because my file was over 45,000 lines long. I was importing a Book Inventory. I tried importing a few records and that seemed to work.

Is there a certain limit on the number of lines?

OK. Got it down to 9,000 lines long, and it still fails to import. Any thoughts?

I think the import is time limited. So if the loading of the source XML takes too long the import will fail. I’m not sure if I remember correctly but the limit is set to 3 or 6 seconds.

If it’s a dynamic external source you could try to save it to your server first and use that static file for your import.

OK. Got it to work by getting it down to 6,000 lines, but it fails to import attributes. Does this extension accept attribute values? If so, am I entering them in correctly?

Here’s my setup. alt text

Any ideas? If anyone could help me that would be awesome! Thanks for your time!

There should be no need to use text() for attributes.

Thanks Nils, that worked. BUT, I do have a new situation. All the data that was imported, when I try to page through the items in the Symphony backend, it doesn’t page through. It says Page 1 of 88, I click on next, then it puts the get variable of ?p=2, but it doesn’t go to page to. I tried manually entering in a page, and it’s just stuck there.

Weird. Have you run across this?

I upgraded to 2.07 and that didn’t solve the issue. For some reason, I cannot page through my imported entries in the admin. Can someone help?

UPDATE: OK. Just looked at my phpmyadmin, there are no records in those fields which is weird because it’s showing some records in the admin.

Here’s my importer php script,

I’m using Rowan’s lastest changes with Symphony 2.0.7… and it’s still creating blank entries in the database, but it shows some data in the symphony admin. When I look in my database… the table is blank.

UPDATE: I disabled the extension and re-enabled it. Now, I get my original error…

Import Failed

No data to import.
DOMDocument::loadXML() [domdocument.loadxml]: Empty string supplied as input
No entries to import.

Here’s my PHP import script,

Here’s what my XML looks like, (Note, I couldn’t get all of the XML since Pastie won’t allow over 100kb of a post)

Any thoughts? Your help is much appreciated!

@buzzomatic or @nickdunn or @Nils, could one of y’all advise me on what to do. I’ve tried everything and I still can’t get this to work.

Thanks for your help!

Allen helped me out.

The import issue, Allen had me test one entry to see if it would write to the database. That was successful. So then he had me test 20 entries. That was successful, then he told me to try 500 entries. That worked.

My issue was that my 4000 entries was overloading the script, so I had to approach it in chunks.

The paging problem (after the import) that I was having in the admin was due to my .htaccess file under the ADMIN section…

        RewriteRule ^symphony/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L]

        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^symphony(/(.*/?))?$ index.php?symphony-page=$1&mode=administration&%{QUERY_STRING} [NC,L]

This part RewriteRule ^symphony(/(.*/?))?$ index.php?symphony-page=$1&mode=administration&%{QUERY_STRING} [NC,L] was wrong on mine. Mine had no space between &mode=administration&%{QUERY_STRING} and [NC,L].

So as soon as I adde the space between &mode=administration&%{QUERY_STRING} and [NC,L], they admin started paging properly.

Has anyone been successful importing xml data into a Select Box Link field? If so, would you mind sharing what you did to get it to work?

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