1b.app
Link copied -

product images not loading

Good evening.
Products on the site are not updated via api.
The files themselves are created
category.json
categoryimages.json
images.json
product.json
- here is the screenshot
but the update of the data from these files does not occur. Images are not loaded into products and are not written to the database.
in the log.txt file like this:
UPDATE IMAGE:
UPDATE CATEGORY IMAGE:
Wed, 23 Nov 2022 12:44:52 +0100:
UPDATE CATEGORY: <b>Notice</b>: Undefined variable: json_url in <b>/var/www/www-root/data/www/test2.jap.in.ua/catalog/controller/api/oneboxsync.php </b> on line <b>74</b>
I don't know what the error is, but I suspect that maybe in the php settings.
Or in the engine itself, because. even session in api is not created when requested from cron.php
Or maybe there is something wrong with Curl. Because when you try to echo $response (in the cron.php file), nothing is output. Those. does not even pass authorization through curl_init( $host .'index.php?route=api/login/' ); And the script fails to get the token for further updates.
Original question is available on version: ru

Answers:

print the authorization request response. Just before its json_decode
25.11.2022, 10:08
Original comment available on version: ru

The authorization request showed error 404. I understood what the error was, initially the path to the controller function was incorrectly written in the cron.php file, namely, an extra slash at the end. Removed it and all went well. did this: "index.php?route=api/login". Screen attached.

Now there are other errors. They are clearly visible in log.txt
1. When updating images, the server issues a timeout (error 504). Because, I suppose, there are a lot of images and they simply cannot be updated in one pass. How to be, what do you advise? I note that max_execution_time=300 (i.e. 5 minutes), but the timeout is triggered literally in 30-40 seconds. Screen attached

2. an error in the languages array element, due to which the script cannot recognize the array correctly and continue working
UPDATE CATEGORY: <b>Warning...........
[json_url] => catalog/onebox/category.json
[languages] => "\"[\\\"en\\\"]\""
log.txt attached.
category.json attached
What do you advise?
25.11.2022, 17:53
Original comment available on version: ru

Question number 1) I remove from the previous comment. After several passes of cron.php, the pictures loaded normally.
25.11.2022, 18:10
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment