Closed LouisCuvelier closed 5 years ago
Hi @LouisCuvelier,
Hard to say what's happening there... Would you mind pinging me (@lindseydiloreto
) on Craft Slack? I'm happy to help troubleshoot this issue.
We'll report the resolution back to this thread for future reference.
Got this all sorted out via Slack. Here's the end result for future reference...
It turns out there was a minor redirect happening, where the OP was appending trailing slashes to all URLs. Seems pretty innocent, but it was having a direct impact on the plugin's AJAX calls. When a POST request is redirected, it will be automatically downgraded to a GET request. The plugin's controller method requires a POST request, so it was failing.
The solution was to create an exception to the redirect rule. This allowed the AJAX call to happen normally, and not be subjected to the trailing slash redirect.
RewriteCond %{REQUEST_URI} !^/actions/star-ratings/rate
Putting this line in the .htaccess
file prevents the AJAX call from being redirected. 👍
Hi,
I bought the plugin but It doesn't work as expected. When I click on a star to set the rating, It show an error 400. Here's the error :
How can I fix this please ?
Regards, Louis