• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Unable to Like Image..

Status
Not open for further replies.

neoark

Chevereto Member
In my Nginx log I get json URL which gives following error:

Code:
{"status_code":400,"error":{"message":"Invalid request","code":403,"context":"Exception"},"request":{"auth_token":"f<hidden>","action":"like","like":{"object":"image","id":"HRB"},"_":"1476386098019"},"status_txt":"Bad Request"}

Any clue what could be causing this when I try to like a image?
 
Last edited:
No idea, in the demo works fine. Which version are you running?
 
I am running: 3.8.3 . I get a bar on the top "An error occurred. Please try again later." Tried setting php and debug to 3. But nothing showed up just error.log for nginx.

Code:
2016/10/13 17:31:39 [error] 1559#1559: *10193 FastCGI sent in stderr: "PHP message: Invalid request" while reading response header from upstream, client: 100.36.74.235, server: imges.link, request: "GET /json/?auth_token=f<hidden>&action=like&like%5Bobject%5D=image&like%5Bid%5D=HR9&_=1476394281119 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "imges.link", referrer: "https://imges.link/image/HR9"
 
Last edited:
Hmm, that is so weird. I tried two accounts and I am getting the same error on all the images. I think it might have to do with CloudFlare and aggressive page rules (caching) I have setup.

What path should not be cached by CDN? So far my list is following:

/api/
/json/
/connect/
/account/

Am I missing anything else? Are you able to like https://imges.link/image/HR9 ?
 
You should cache only the static resources, which are files and existing directories. You shouldn't cache anything else.
 
Hello,

It seems like the problem is something else. I tried directly entering server IP and doing like. However, I still get same error.

Code:
https://<ip>/json/?auth_token=<token>&action=like&like%5Bobject%5D=image&like%5Bid%5D=HRB&_=1476401471939

{"status_code":400,"error":{"message":"Invalid request","code":403,"context":"Exception"},"request":{"auth_token":"<token>","action":"like","like":{"object":"image","id":"HRB"},"_":"1476401471939"},"status_txt":"Bad Request"}
 
Last edited:
That error response tells me nothing because that is the frontend error display. Usually you won't ever see the real error there. You must enable debug level 3 and then check the real error at your server error_log file.

Taking into account what the error says (403) that is usually related to the auth token (sessions), but it could be an unexpected exception triggered by some other thing.
 
Your website is all messed up. I think you're missing some CSS and other system files.

a270ddbbaacbc85c793f73842e14aa1a.jpg
 
Last edited:
After enabling debug_level = 3 we found the error right away:
Code:
error:{message: "Invalid owner in CHV\Like::insert", code: 104, context: "CHV\LikeException"}

@Rodolfo now is taking a look at it.
 
What is going on here is that private profiles are limited to interact with others. One of the main reasons behind that is that private profiles are all about being private. So thing is that images owned by a private profile can't be liked and a private user can't like other users content.

I think that private profiles shouldn't be limited here. I will remove all those limitations.

@Ricardo where is the log file being saved?

That's not logged, that is a frontend error that we triggered enabling debug_level 3.
 
I was testing some stuff then your server went offline or is blocking me. Make sure that SFTP works for me, I haven't finished yet with your website.
 
Status
Not open for further replies.
Back
Top