Hello, everyone.
I have a shop on a shared server. 2 days ago my site stopped working suddenly, with an Error 500. It turned out my hosting provider changed their folder path structure, so I had to change the dir paths in my config.php (in the admin folder, too). After that my site worked again, except one thing: product images are not showing up. The logo shows up, but the product images are empty. I checked the source with firebug and the img src's are empty. The same happens when I view the products in the admin panel: no images appearing.
The hosting tech support suggested: "Please re-add the product images" which sounds ridiculous to me. I have hundreds of products with thousands of pictures. Does anyone have any idea what happened and how it could be fixed?
Opencart version: 2.3.0.2. / Single store.
Thank you!
I have a shop on a shared server. 2 days ago my site stopped working suddenly, with an Error 500. It turned out my hosting provider changed their folder path structure, so I had to change the dir paths in my config.php (in the admin folder, too). After that my site worked again, except one thing: product images are not showing up. The logo shows up, but the product images are empty. I checked the source with firebug and the img src's are empty. The same happens when I view the products in the admin panel: no images appearing.
The hosting tech support suggested: "Please re-add the product images" which sounds ridiculous to me. I have hundreds of products with thousands of pictures. Does anyone have any idea what happened and how it could be fixed?
Opencart version: 2.3.0.2. / Single store.
Thank you!
Well, one could possibly find out, where you screwed up, if you at least present
a Sitelink, and some links and paths out of your config.php files.
It could also be this <base href="{{ base }}" /> line in your
theme/template/common/header.tpl , not linking correctly, and just
to make sure, you could rewrite it to: <base href="http://www.yourshop .com/shop/" />
or whatever url you use...
And in your .htaccess file, you have this REWRITE LINE:
RewriteBase /
possibly required to be directed to your new Shop Sub, like i.E. /shop/:
RewriteBase /shop/
But as I usually say: No Figures = No Facts !
Ernie
a Sitelink, and some links and paths out of your config.php files.
It could also be this <base href="{{ base }}" /> line in your
theme/template/common/header.tpl , not linking correctly, and just
to make sure, you could rewrite it to: <base href="http://www.yourshop .com/shop/" />
or whatever url you use...
And in your .htaccess file, you have this REWRITE LINE:
RewriteBase /
possibly required to be directed to your new Shop Sub, like i.E. /shop/:
RewriteBase /shop/
But as I usually say: No Figures = No Facts !
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Thanks, Ernie. Yes, sorry, you are right I missed some important information.IP_CAM wrote: ↑Mon Jul 31, 2017 11:10 amWell, one could possibly find out, where you screwed up, if you at least present
a Sitelink, and some links and paths out of your config.php files.
It could also be this <base href="{{ base }}" /> line in your
theme/template/common/header.tpl , not linking correctly, and just
to make sure, you could rewrite it to: <base href="http://www.yourshop .com/shop/" />
or whatever url you use...
And in your .htaccess file, you have this REWRITE LINE:
RewriteBase /
possibly required to be directed to your new Shop Sub, like i.E. /shop/:
RewriteBase /shop/
But as I usually say: No Figures = No Facts !
Ernie
Site : http://stylod.com/
Old config.php:
// DIR
define('DIR_APPLICATION', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/catalog/');
define('DIR_SYSTEM', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/system/');
define('DIR_IMAGE', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/image/');
define('DIR_LANGUAGE', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/catalog/language/');
define('DIR_TEMPLATE', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/catalog/view/theme/');
define('DIR_CONFIG', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/system/config/');
define('DIR_CACHE', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/system/storage/cache/');
define('DIR_DOWNLOAD', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/system/storage/download/');
define('DIR_LOGS', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/system/storage/logs/');
define('DIR_MODIFICATION', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/system/storage/modification/');
define('DIR_UPLOAD', '/hermes/bosnaweb13a/b1543/ipg.noonfashioncom/stylod/system/storage/upload/');
New config.php
// DIR
define('DIR_APPLICATION', '/home/users/web/b1543/ipg.noonfashioncom/stylod/admin/');
define('DIR_SYSTEM', '/home/users/web/b1543/ipg.noonfashioncom/stylod/system/');
define('DIR_IMAGE', '/home/users/web/b1543/ipg.noonfashioncom/stylod/image/');
define('DIR_LANGUAGE', '/home/users/web/b1543/ipg.noonfashioncom/stylod/admin/language/');
define('DIR_TEMPLATE', '/home/users/web/b1543/ipg.noonfashioncom/stylod/admin/view/template/');
define('DIR_CONFIG', '/home/users/web/b1543/ipg.noonfashioncom/stylod/system/config/');
define('DIR_CACHE', '/home/users/web/b1543/ipg.noonfashioncom/stylod/system/storage/cache/');
define('DIR_DOWNLOAD', '/home/users/web/b1543/ipg.noonfashioncom/stylod/system/storage/download/');
define('DIR_LOGS', '/home/users/web/b1543/ipg.noonfashioncom/stylod/system/storage/logs/');
define('DIR_MODIFICATION', '/home/users/web/b1543/ipg.noonfashioncom/stylod/system/storage/modification/');
define('DIR_UPLOAD', '/home/users/web/b1543/ipg.noonfashioncom/stylod/system/storage/upload/');
define('DIR_CATALOG', '/home/users/web/b1543/ipg.noonfashioncom/stylod/catalog/');
That's all that got modified, nothing else (stylod folder is the content of stylod.com) . After this modification, the images disappeared, as you can see.
.htaccess were never modified.
Do you have any idea?
Well, your Product Listings contain no Image URL, for some unknown reason:
You have to check on, how they are saved/linked in the Database.
Ernie
---
Sample (OC v.1.5.6.x only!) DB Image Linking.
Code: Select all
<img src="" alt="Pinky White Marble Case for iPhone" .... />
<img src="" alt="Light Blue / Pink / Yellow Marble Case for iPhone" .... />
<img src="" alt="Wood Sunglasses (Black Lenses)" .... />
Ernie
---
Sample (OC v.1.5.6.x only!) DB Image Linking.
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
As you can see, all the product images are linked correctly. There were no changes made in the database. I only modified the config.php server global paths and that's all.
I've just noticed when I try to upload a new photo in opencart admin, the image manager is fully empty. See the attached screenshot. When i try to create a folder with image manager, i get this error: "Warning: Directory does not exist!".
I'm really annoyed now. Does anybody have any idea what happened?
I've just noticed when I try to upload a new photo in opencart admin, the image manager is fully empty. See the attached screenshot. When i try to create a folder with image manager, i get this error: "Warning: Directory does not exist!".
I'm really annoyed now. Does anybody have any idea what happened?
Attachments
Képernyőfotó 2017-08-01 - 14.31.10.png (17.2 KiB) Viewed 8139 times
Képernyőfotó 2017-08-01 - 14.26.24.png (145.8 KiB) Viewed 8139 times
@max05 did you manage to resolve the issue?
I am experiencing the same symptoms following update from 1.5.6.4 to 2.3.0.2. Config DIR_IMAGE paths are correct as are database entries for product image path.
Update Turns out forward slashes cannot be used in paths in the config files in OC 2.3.0.2. My server accepts forward slashes in the paths generated during installation of 1.5.x (the installer ends up with a mix of back and forward slashes) hence I didn't immediately identify it as an issue when checking the config files.
I am experiencing the same symptoms following update from 1.5.6.4 to 2.3.0.2. Config DIR_IMAGE paths are correct as are database entries for product image path.
Update Turns out forward slashes cannot be used in paths in the config files in OC 2.3.0.2. My server accepts forward slashes in the paths generated during installation of 1.5.x (the installer ends up with a mix of back and forward slashes) hence I didn't immediately identify it as an issue when checking the config files.
@max05: sorry for delay, it's a busy time here...
You missed to show us the Upper Part of the ROOT
config.php file, where your http/s - linking is configured.
Maker it look like below:
And if you want to use HTTP Image linking, wich works more efficient as well,
to make it work for sure, read here about it:
Cookieless HTTP Domain Routing
https://www.opencart.com/index.php?rout ... n_id=23506
---
Ernie
You missed to show us the Upper Part of the ROOT
config.php file, where your http/s - linking is configured.
Maker it look like below:
Code: Select all
<?php
// HTTP
define('HTTP_SERVER', 'http://stylod.com/');
define('HTTP_IMAGE', 'http://stylod.com/image/'); // IF HTTP_IMAGE EXISTS in your Setup !!
// HTTPS
define('HTTPS_SERVER', 'http://stylod.com/');
define('HTTPS_IMAGE', 'http://stylod.com/image/'); // IF HTTPS_IMAGE EXISTS in your Setup !!
to make it work for sure, read here about it:
Cookieless HTTP Domain Routing
https://www.opencart.com/index.php?rout ... n_id=23506
---
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 9 guests