Search

Hi there,

I am new to Symphony CMS and I am just creating my first XML Importer. I am using Symphony CMS 2.3.1 with the xmlimporter extension 2.0. When I try to run it I get the following error:


Symphony Warning: strtr() expects parameter 1 to be string, array given

An error occurred in /Users/fortunatogeelhoed/Sites/cdu/symphony/lib/toolkit/class.lang.php around line 552

547          * @return
548          * Returns the transliterated string
549          */
550         private static function applyTransliterations($string) {
551             // Apply the straight transliterations with strtr as it's much faster
552             $string = strtr($string, self::$_transliterations['straight']);
553
554             // Apply the regex rules over the resulting $string
555             return preg_replace(
556                 array_keys(self::$_transliterations['regexp']), 

The XML is as follows: <![CDATA[174add52-6870-4dbf-aa21-90a47c77b52c]]> 1<![CDATA[Africa]]> <![CDATA[AFRICA]]> <![CDATA[AFRICA]]> <![CDATA[/images/cruise/maps/africa.gif]]> <![CDATA[1]]> <![CDATA[AFR]]> <![CDATA[1]]> <![CDATA[1]]> ....

Please see the attached image for the XML Importer configuration.

Any pointers are greatly appreciated : )

Here is an image of the XML I am working with:

Attachments:
Screen Shot 2012-12-28 at 3.07.02 PM.png

I am having the same problem as well. Running XML Importer 2.0 with Symphony 2.3.1. Any thoughts?

Looks as if others are having this problem too. @Fazal submitted the following issue in the Github issue tracker for the XML Importer extension.

Anybody figure out how to get this to work??? I'm stuck.

UPDATE: I updated the lib/class.xmlimporter.php with the changes that Brendo made in the integration branch.

After that change, I get the following error...

Symphony Warning: implode(): Invalid arguments passed (at line 253)

else {
       $value = implode('', $value);
}

So I commented out lines 252-254 like so, and saved the file

/* else {
       $value = implode('', $value);
} */

And I was able to import!

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