Search

Hi guys

I'm trying to some opening hours in to symphony using the remote datasource extension. I can access these hours through a GET http request, using the shop's API & the data is sent in JSON format. If I try to access it simply by typing the link in the browser, it works:

{"0":{"startDate":"2014-09-17T07:00:00+02:00","endDate":"2014-09-17T13:00:00+02:00","comment":"test nl"}}

Trying this using the remote datasource extension, I get following error message:

Failed to load URL, status code 400 was returned.

When I try to test the same thing with an other JSON source (from http://headers.jsontest.com/), I'm able to make the datasource but I find this in the XML-feed:

<cudi-openingsuren valid="false" url="http://headers.jsontest.com/">
        <error>Transformed XML is invalid.</error>
        <errors>
            <item>loadXML(): Start tag expected, '&lt;' not found in Entity, line: 1</item>
            <item>loadXML(): Start tag expected, '&lt;' not found in Entity, line: 1</item>
        </errors>
        <raw-data><![CDATA[{
   "Host": "headers.jsontest.com",
   "User-Agent": "Symphony",
   "Accept": "application/json, */*Content-length: 0",
   "Content-Type": "application/x-www-form-urlencoded; charset=utf-8"
}]]></raw-data>
    </cudi-openingsuren>

In both cases I included all elements (xpath: /) and following settings: Timeout: 6 Cache expiration: 5 Format: JSON

Anyone any idea what I'm doing wrong?

@WilliamC Could you confirm what version of Symphony and what version of the extension you're using?

I had the same error.
Somehow saving the datasource and directly clearing the cache worked for me...
(symphony 2.3.2 and remote ds 1.1, so not sure if this is fixed in the latest version already).
Seems like a bug to me cause it should work straight out of the box.
See if this works for you and then we should probably report a bug...

Edit: I am referring to the error your second json feed;

Start tag expected, '&lt;' not found in Entity, line: 1

First one i am not sure...

@Cremol

…cache…

Ah, that old chestnut.

@nathanhornby I'm running symphony 2.4.0 and remote datasource extension 2.1.0

@Cremol Thanks! That does the trick for my test source, but the first one stil doesn't want to work..

Symphony 2.5.1 fixes the cache issue with Remote Datasources. See this and this for more information.

I was getting numerous cache errors, not just those related to Mutex. I would recommend either upgrading to 2.5.1 or at the very least trying to apply this patch as the SQL was malformed to properly remove cache.

@cremol: any idea, why it works once the cache is cleared? i am generating a remote datasource custom from an extension and would like to use it without manual interference (clearing the cache). any idea how i would go about it?

thanks! :)
azzagazz

also, when cache is set to database where would this be cached to? i cannot see anything resembling that in the database.

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