I've recently upgraded OpenCart from version 1.5.4 to 2.0.3.1. Everything appears to be working except for the Image Manager functionality.
When I upload a new picture, to a specific product, a pop-up window says "success". However, whenever I return to the Image manager window, the icon/picture isn't displaying - just the name of the file. If I open up web developer tools, the request for the image is returning a 404 error too.
Oddly, the image is present on the host cPanel's file viewer under .../store/image/catalogue.
Any tips will be appreciated
When I upload a new picture, to a specific product, a pop-up window says "success". However, whenever I return to the Image manager window, the icon/picture isn't displaying - just the name of the file. If I open up web developer tools, the request for the image is returning a 404 error too.
Oddly, the image is present on the host cPanel's file viewer under .../store/image/catalogue.
Any tips will be appreciated
Why not 2.3.0.2? or 3.0.3.8SpannerMagnet wrote: ↑Thu Jan 06, 2022 11:51 pmI've recently upgraded OpenCart from version 1.5.4 to 2.0.3.1.
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Possible 2.0.3.1 use another structure for config files.
What payment you use?
What payment you use?
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Is it a resized image, one with the size added to the filename, that isn't loading?
Have you checked both your OpenCart and PHP error logs?
Have you checked both your OpenCart and PHP error logs?
Yeah it looks like a resized image.Failed to load resource: the server responded with a status of 404 () copper%20368a%20small-100x100.jpg
I don't see anything relating to images in the OpenCart error log:
I don't see any error log on my host's cPanel.2021-12-27 16:45:42 - PP_STANDARD :: RECEIVER EMAIL MISMATCH! admin@proactionsport.co.uk
2021-12-29 15:09:02 - PHP Notice: unserialize(): Error at offset 0 of 2 bytes in /customers/2/9/1/proactionsport.co.uk/httpd.www/store/system/library/cart.php on line 174
2021-12-29 15:09:02 - PHP Warning: Undefined array key "product_id" in /customers/2/9/1/proactionsport.co.uk/httpd.www/store/system/library/cart.php on line 176
2021-12-29 15:09:02 - PHP Notice: unserialize(): Error at offset 0 of 2 bytes in /customers/2/9/1/proactionsport.co.uk/httpd.www/store/system/library/cart.php on line 174
2021-12-29 15:09:02 - PHP Warning: Undefined array key "product_id" in /customers/2/9/1/proactionsport.co.uk/httpd.www/store/system/library/cart.php on line 176
2021-12-29 15:09:02 - PHP Notice: unserialize(): Error at offset 0 of 2 bytes in /customers/2/9/1/proactionsport.co.uk/httpd.www/store/system/library/cart.php on line 174
2021-12-29 15:09:02 - PHP Warning: Undefined array key "product_id" in /customers/2/9/1/proactionsport.co.uk/httpd.www/store/system/library/cart.php on line 176
Hi SpannerMagnet,
Hope this is helpful,
Gergely
Have you tried with a filename that doesn't include spaces? Although they really shouldn't, spaces in filenames still can cause problems...Failed to load resource: the server responded with a status of 404 () copper%20368a%20small-100x100.jpg
Hope this is helpful,
Gergely
UPDATE: I have taken a closer look and have a few observations.Gergely wrote: ↑Sat Jan 08, 2022 12:38 amHi SpannerMagnet,
Have you tried with a filename that doesn't include spaces? Although they really shouldn't, spaces in filenames still can cause problems...Failed to load resource: the server responded with a status of 404 () copper%20368a%20small-100x100.jpg
Hope this is helpful,
Gergely
- The file you need is indeed reachable on https://proactionsport.co.uk/store/imag ... 0small.jpg, and other files with spaces in the name are loading without a problem, so spaces (alone) might not be an issue.
- All product images I checked on your site are in the image/data folder, not in image/catalog. Did you rename the data folder to catalog after upgrading? The updater should do this automatically, but I don't know what method you used to update. There are some hardcoded checks in the file manager controller for the 'catalog' folder in the path. I didn't follow through the whole logic to check where this might in fact cause an issue, but this seems like a plausible cause for failure.
- There are images on your site where the resized, cached version is also rotated by 90 degrees. I'm not familiar 1.5.4, so I don't know if this was a known bug, or if it included such features, or if you have been using an extension to achieve this? If it's the latter it might be worthwhile to look into the configuration of that extension as well. (Maybe it's set to operate on a certain folder? This is just a wild-wild guess though.) (An example for such an image: original, rotated.)
Thanks for the response, Gergely!
There were a couple of small fixes to apply after, like making sure the user had full admin rights etc - but no crazy hacks.
As far as I'm aware, I upgraded directly from 1.5.4 to 2.0.3.1 using the steps in the readMe.txt file that came within the OpenCart 2.0.3.1 download.Gergely wrote: ↑Mon Jan 10, 2022 7:54 pmAll product images I checked on your site are in the image/data folder, not in image/catalog. Did you rename the data folder to catalog after upgrading? The updater should do this automatically, but I don't know what method you used to update. There are some hardcoded checks in the file manager controller for the 'catalog' folder in the path. I didn't follow through the whole logic to check where this might in fact cause an issue, but this seems like a plausible cause for failure.
There were a couple of small fixes to apply after, like making sure the user had full admin rights etc - but no crazy hacks.
Nah, there's no extension installed to rotate images. This must've been something that 1.5.4 was doing. Mind of it's own!Gergely wrote: ↑Mon Jan 10, 2022 7:54 pmThere are images on your site where the resized, cached version is also rotated by 90 degrees. I'm not familiar 1.5.4, so I don't know if this was a known bug, or if it included such features, or if you have been using an extension to achieve this? If it's the latter it might be worthwhile to look into the configuration of that extension as well. (Maybe it's set to operate on a certain folder? This is just a wild-wild guess though.) (An example for such an image: original, rotated.)
Essentially I have upgraded this on behalf of a friend (who knows very little about computers ). They've been using this new version now for a couple of months. This is the only bug they have encountered so far. I figured it was a permissions issue or perhaps something missing/wrong with one of the config.php files?Gergely wrote: ↑Mon Jan 10, 2022 7:54 pmI know these are all a bit vague, but it probably boils down to an incorrectly executed update. All in all, updating across major versions is a messy business, and it's usually cleaner to rebuild your system on a clean install of the new version, then migrate the data with the help of a free export/import extension. This way you can keep your old store running while you figure out all the issues in the new version. If you're not too committed to this iteration yet, it might be worthwhile to try again with this method.
When you upload a new image do you see file on your server under .../store/image/catalogue/newimage.jpg?
Do you also see the .../store/image/cache/catalogue/newimage-100x100.jpg resized image?
Did you find your PHP error log (not the OpenCart one)? Maybe error_log in admin. Or ask your hot or use php_info() to find the location.
Do you also see the .../store/image/cache/catalogue/newimage-100x100.jpg resized image?
Did you find your PHP error log (not the OpenCart one)? Maybe error_log in admin. Or ask your hot or use php_info() to find the location.
Well, at this point, without further access / information the only thing I can provide is more guesses.
- Do you have the correct write permissions on the image, catalog and cache folders? Opencart needs to be able to write to the image/cache folder (and subfolders).
- If this has been working so far without problems, as you say, have there been any changes on the hosting side that might have effected this change in behaviour? Perhaps they upgraded the php version? Perhaps running low on storage space? Try to find the php error log as suggested before, check storage availability on server.
- Did you cross check the DIR_IMAGE definitions in the config files with the actual paths? DIR_IMAGE should be the full real path to the image directory.
@ADD Creative: the image this thread was started with is available under /image/catalog/copper%20368a%20small.jpg, but I couldn't load any sized version from the cache folder (by manually constructing the url working with other examples from the same site)
Posted in the wrong forum section.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 234 guests