Search

I did find this possibly relevant series of posts in another thread having to do with the symphony.duplicator.js file, which is the file where the error is occurring on line 17 documented in my last post in this thread.

I'm looking into it but would appreciate any wisdom the forum might offer here.

This suggested fix does not seem to apply to my set up on a Mac OS X running Apache 2.

This is maddening. Does anyone know of any extension conflicts (if that's possible)?

Uncaught TypeError: Object # has no method 'symphonyDuplicator'

Has anyone else run into this issue?

Another bit of info to add to the troubleshooting mix is that @bzerangue and I have pulled from the same git repository to two separate Macs with identical setup. XMLImporter works on his but not mine.

We've cleared the browser cache, restarted servers, cleared the dns cache. Any other ideas?

@bzerangue and I found the culprit. It was an old extension called select box filter, which was calling a separate instance of jQuery, in effect rewriting the call to the common library under the new protocols.

I'm trying to use the xmlimporter to import into a reflection field. Is that possible?

I'm having trouble getting anything to show up in the field. For example this XML:

<entry id="270">
    <bio mode="formatted"/>
    <full-name handle="baker-claire">Baker, Claire</full-name>
    <first-name>Claire</first-name>
    <last-name>Baker</last-name>
    <date-added>2011-05-24 11:33 am</date-added>
    <owner>
        <item id="497">wjn</item>
    </owner>
    <active>Yes</active>
    <production-process-stage>11</production-process-stage>
</entry>

When trying to import the entry/full-name into the name field (reflection) I'm getting a blank.

My Reflection field setup in the Author's Section: reflection field

My xmlimporter attempt at importing: xmlimporter

Example result after import: result

Attachments:
Screen shot 2011-05-25 at 12.34.57 AM.png, Screen shot 2011-05-25 at 12.30.37 AM.png and Screen shot 2011-05-25 at 12.29.53 AM.png

@wjnielsen - I think this answered here

Thanks @bz. I'll take a look.

@wjnielsen I've sent the pull request, although it is under discussion as it causes some increase in the overhead...

Thanks @designermonkey. I'll take a little increase in overhead rather than opening and saving each individual record any day.

Can anyone help me understand what I need to do to get the images imported using xmlimporter?

I'm working on importing images from another symphony site into a unique file upload field. The XML I'm trying to import looks like this:

<data> 
  <entry id="570"> 
    <description mode="formatted"></description> 
    <floating-options> 
                <item handle="no-float-option">-- No Float Option --</item> 
            </floating-options> 
    <image size="6 KB" path="/images" type="image/png"> 
                <filename>five-snapshots-1288358750.png</filename> 
                <meta creation="2010-10-29T08:25:50-05:00" width="250" height="175" /> 
            </image> 
    <title handle="five-snapshots">Five snapshots</title> 
    <related-ministries></related-ministries> 
    <author-ids></author-ids> 
    <tag>202</tag> 
    <owner> 
      <item id="497">wjn</item> 
    </owner> 
    <active>Yes</active> 
    <production-process-stage>11</production-process-stage> 
  </entry> 
</data>

My XMLimporter field looks like this:importer field

When I try and import it the xmlimporter gives the following error feedback, refusing the import:

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

<entry id="570">
  <description mode="formatted"/>
  <floating-options>
    <item handle="no-float-option">-- No Float Option --</item>
  </floating-options>
  <image size="6 KB" path="/images" type="image/png">
    <filename>five-snapshots-1288358750.png</filename>
    <meta creation="2010-10-29T08:25:50-05:00" width="250" height="175"/>
  </image>
  <title handle="five-snapshots">Five snapshots</title>
  <related-ministries/>
  <author-ids/>
  <tag>202</tag>
  <owner>
    <item id="497">wjn</item>
  </owner>
  <active>Yes</active>
  <production-process-stage>11</production-process-stage>
</entry>

array (
  'title' => 'Five snapshots',
  'owner' => '497',
  'production-process-stage' => '11',
  'upload-a-file' => '
                <filename>five-snapshots-1288358750.png</filename>
                <meta creation="2010-10-29T08:25:50-05:00" width="250" height="175" />
            ',
  'tags' => '202',
  'date-added' => '',
  'active' => 'Yes',
)

I checked the image directory and files for permissions they are all presently 777 and should therefore be readable.

I found these two posts that might be relevant but haven't helped me solve my dilemma:

Can anyone help me understand what I need to do to get the images imported?

Attachments:
Screen shot 2011-05-26 at 3.45.25 PM.png

Update to the above post:

I've tried manually constructing the image url with this template:

<xsl:template match="image" mode="get-image-path">
    <image-path>
        <xsl:text>http://xml.pcpc.org/workspace</xsl:text>
        <xsl:value-of select="@path"/>
        <xsl:text>/</xsl:text>
        <xsl:value-of select="filename"/>
    </image-path>
</xsl:template>

The import is successful; however, no image is selected in the path.

Two thoughts:

  1. The url I used is, of course, from the old site.

  2. If I move all the image files to the directory I want them in and the amend the above template to create the destination url will that do the trick?

More in a bit...

PS: Google Chrome and this wysiwyg have a conflict with the list items (both ordered and unordered).

So sorry, I think I have extended my tenure as the forum's stupid poster.

I have no reason why I should think this extension would migrate image files. Forgive the stupidity.

The answer is to migrate the files yourself, then amend the file path to reflect the new directory with the same file name.

Heh :-) I think phoque had a similar problem and may well have posted his similar conclusion earlier in this thread.

I am moving a discussion here which started on GitHub's issue tracker but is really off-topic there. Furthermore it might be of common interest:

I don't know anything about the inner workings of the XML Importer, so forgive me if what I say is pure nonsense.

Like @designermonkey, I quickly hit memory limits when I tried the XML Importer (long ago). This was the reason for me to build standalone PHP scripts which will post data to the Symphony frontend (based on Nick Dunn's importer article). These scripts use the DOMDocument to build an object of all entries, then create a PHP array which can be used to post data. I noticed that again there were problems with larger data sets. But this time they were caused by the POST request having too much data in the POST fields. So I invented a loop there to use only a few (5 to 20) entries for one POST request. Now the import runs fine even with large sets of data.

As I said, I don't know how the XML Importer does this job. Is the memory consumption so high during XMLElement creation? In this case one might try to pre-process the XML into smaller chunks and build smaller XMLElements. If the memory problem occurs later, one might try to invent some looping logic (using smaller chunks/slices of data) there.

My memory limits issues have arisen from Reflection Field and Subsection Manager which both do their own xPath magic internally, and therefore chewing up memory.

I too don't know how this does it's stuff, but a little light reading on PHP and memory management divulged that PHP will only clear memory after the entire script has run, therefore when there's a huge stack of entries to import, which each call the Subsection Manager and Reflection Field, they're just piling on top of each other...

Rowan, is it possible to clear out the memory after each entry is imported? I wouldn't know how to do it.

You can't really control PHP's garbage collector directly, but you can kind of mark an item for collection (to free memory) by unsetting it or setting it's value to null so long as there are NO more references to the object. Setting it to null tends to push it to the collector faster, but can result in a little more overhead. This could help with memory management since I'm assuming the XML Importer imports things within a loop; it's worth trying anyway.

Or perhaps unset() too, and maybe gccollectcycles.

Hi there,

I'm trying to import a xml into one of my sections, but I'm struggling with some namespace declarations. I want to import a list of houses that I got from a external website. But I didn't get any data inside my sections. When I run the XML Importer, it notified that the import is completed and says that the import completed successfully: 1 new entries were created, 0 updated, and 0 skipped.
After this there is a entry created at the section, but there is no data inside.

Below you see the XML Importer that I use. You can see a bigger version at the attachments: alt textalt text

The XML can be found at this link.

Attachments:
Schermafbeelding 2011-06-13 om 12.50.37.png and Schermafbeelding 2011-06-13 om 12.50.14.png

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