olivierbon / Placid

Placid is a Craft plugin which makes it easy to consume REST services in your twig templates
77 stars 5 forks source link

500 error when accessing request via AJAX #14

Closed mcclaskiem closed 9 years ago

mcclaskiem commented 9 years ago

I am currently trying to access a request in Placid via JS on the front-end.

I structured my AJAX the same as the docs mention:

    $.get('{{ actionUrl('placid/requests/request', { handle : 'githubContributor'}) }}', function(response){
        console.log(response);
    });

In the client console I am getting a 500 Error

On the craft logs I get this error: exception 'CException' with message 'Craft\Placid_RequestsService and its behaviors do not have a method or closure named "setOptions".' in .../craft/app/framework/base/CComponent.php:266

Is this an issue with the request formatting or an issue with the plug-in?

alecritson commented 9 years ago

Hey @mcclaskiem

Looks like you found a bug, thanks for brining this up. Just pushing a fix now :+1:

alecritson commented 9 years ago

If you download version 1.5.2 and update placid, this should hopefully be resolved.

mcclaskiem commented 9 years ago

@alecritson Thanks very much for the quick fix!