• 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:

  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Phrases missing for duplicated upload

Please describe the steps needed to trigger the issue.
 
I'm unable to replicate the error. I'm getting this:

2242

Could be that the actual translation is wrong, in which case I need the language being used to try to get the reported error.
 
@Rodolfo Please can you let me know that where I can check this translation Phrases? Do you need my site login info for check why happened for my site?

Please note, I am using PHP 7.3.4 so does this PHP 7.3 issue?
 
The only stuff that could be tied to this is that either the actual .po file used for translation contains legal chars (is extremely easy to screw a .po file if you edit it manually) or your website is returning an unexpected object for the XHR request data.

Testing on demo an dev doesn't show this error, so it not a bug present in these setups.

The only way to really know whats going on is checking directly in your website so please provide a website URL to test.
 
The duplicate upload response data should be like this:
[CODE lang="json" title="Response"]{
"status_code": 400,
"error": {
"message": "Duplicated upload",
"code": 102,
"context": "Exception"
},
"request": {not disclosed for this purpose},
"status_txt": "Bad Request"
}[/CODE]
^ You can check that the demo issues this response.

Your website is giving this response data:
[CODE lang="json" title="Bad response"]{
"status_code": 400,
"error": {
"message": {},
"code": false,
"context": null
},
"request": {not disclosed for this purpose},
"status_txt": "Bad Request"
}[/CODE]

As you may notice, the error object has missing properties. Since demo runs the same version you are using, either your modifications are causing this or PHP 7.3 is giving issues here (I can't check that right now, I'm doing maintenance for my local machines). Tested PHP 7.3.4 without any issues.

If you want to try to check on your own keep reading.

The code that detects dupes:
[CODE lang="php" title="app/lib/classes/class.image.php"] // Detect duplicated uploads (all) by IP + MD5 (second layer)
if ($do_dupe_check && self::isDuplicatedUpload($image_upload['uploaded']['fileinfo']['md5'])) {
throw new Exception(_s('Duplicated upload'), 102);
}[/CODE]

The exception thrown by the code above is turned into a error response:
[CODE lang="php" title="app/routes/route.json.php"] $json_array = G\json_error($e);
$json_array['request'] = $_REQUEST;
G\Render\json_output($json_array);[/CODE]

From there, is G\Render\json_output() which handles the response.
 
Last edited:
I have not this code my /app/lib/classes/class.upload.php So can we download 3.12.10 files and re-upload all files?
 
Last edited by a moderator:
Yes, I have this code via app/lib/classes/class.image.php I think this issue happened with PHP 7.3, So i will wait PHP 7.3 support update. Thanks
 
Tested on PHP 7.3.4. No issues at my end.

Edit: I noticed a wrong function argument which in your setup returns false and in mine returns 1. I've fixed the bug at /lib/G/functions.php

The patch will be available in the next release.
 
Back
Top