XetaIO/Xeta

Like/Unlike blog articles doesn't work

Closed this issue · 5 comments

For some reason, I'm not able to like/unlike blog articles. I always get a red error message in the top right corner saying: Error to like/unlike the article. I have no idea where I should look for the error. Please help, thanks!

Xety commented

Can you post the Response please ?

Put the debug in true in your app.

In Chrome : Inspect Element => Network => Select the failed request => Tab Response

It will probably have a lot of code in the Response.

Here's the response: https://dl.dropboxusercontent.com/u/26226231/response.txt

I checked the preview and got this error: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous

Thanks for the fast reply btw!

Ahhh, I found the error! It's in the file Controller/BlogController at line 498:
I changed 'id' => $articleId to 'BlogArticles.id' => $articleId

Thanks for pointing out how to find the error! :D

Xety commented

Glad you found the error !
No problem, you're welcome ! Now you know how i debug to find an error with an AJAX call. 😛