Jump to content

[SOLVED] No image available and image upload issues in Backoffice


Recommended Posts

So we had an issue with an empty cart as documented here and after trying many things the only way we could fix it was a fresh Prestashop 1.6.0.13 install, then import all the product and other related tables via SQL. We then copied over all of the images via FTP to the appropriate /img directorys and every thing is back up and running very well.
 
We seem to  have only 2 issues outstanding:
 
1. No Image Available - Whilst all the images in the FrontOffice for the products appear correctly, and also in the Product Listing in the BackOffice, when you click into a specific product, it shows the "No image available" (1) graphic instead of the actual image. However when you click on the "No image available" image, the fancybox popup correctly shows the product image (2).
 
post-454997-0-86043000-1428952723_thumb.jpg
 
2. Can't Upload Images - Probably related to the same issue, but when you try to add an image to an existing or new product we get an error of "An error occurred while copying image."
 
Any assistance is appreciated.

Edited by Marianosc (see edit history)
Link to comment
Share on other sites

Hi Marianosc,

 

can you check something?

 

Start up the Chrome browser

go to your back office, to the page with the "No Image Available" element and right-click on it and (chrome) choose inspect element

 

there you will see the url to your image which is missing.

something like: "/img/p/1/1-small_default.jpg" (if it was product with id=1)

 

copy this path and then go to a new browser page:

 

 

type as url:

http://http://www.imaginiya.com/img/p/1/1-small_default.jpg   (change blue with your own image path)

 

- can you load the image?

- if not, see if the image is really available in this path on the server.

- If the image is there, then it is probably a permission problem. 

 

The 2nd error you get also looks like a permission problem.

 

Check if ALL the files in the /img directory and its subdirectories have permission '644', and all folders permission '755'

if not, maybe use an ftp app like filezilla to set the permissions correctly (CHMOD command. Google to find out more if needed)

 

Hope that helps,

pascal

Link to comment
Share on other sites

Hi PascalVG,

 

As you'll see from the code below (trimmed some out for brevity), the img src is actually the base64 code for the "No image available" picture instead of the url. The href on the img however is the correct url which is a valid path and opens the img.

<a href="/img/p/3/1/31.jpg" class="fancybox">

<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eF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Ow4RjwvinkjcIgAPAua4Et6HRJQcO43/AArdL/EwnXNyfuRjEnw87Jur9rJ69viqWwp0gwWg4ro9FlS5WtwjHPIwRulklfK8MBsMBeSQ0H4FD2/CkvEuPyaCHQv1jDr4HecMfm643WT5NffkDZPYN9n4WeRBiOP8f1eiEx10MjXz16sks75Xuq6tzyTQs0P9WXtOkQL/AMREQQIqogIhVQT4QK0naCK0g9k7QE+ERAHsnyiIJ0iv7RBAr8oiCfCH5REFHsg9kRAHsiIgH2Q+yIgD2REQEREH/9k=" alt="Kryvaline Daubers" title="Kryvaline Daubers" class="img-thumbnail" pagespeed_url_hash="3435436302" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">

</a>

I CHMOD'ed ALL the files in the /img directory recursively with permission '644', and all folders recursively with permission '755'.

 

And just for fun, I also regenerated all thumbnails after having changed the permissions but am still in the same boat with the above 2 issues :(

Link to comment
Share on other sites

So I tested renaming the img/p directory to another name then creating a new empty img/p director, naturally all my products were then missing their pictures. I then created a new product and was able to successfully upload an image.

 

The part I don't get is that both directories have the exact same CHMOD permissions.

 

Any suggestions as I would rather not manually want to reupload 600 images.

Link to comment
Share on other sites

Hi Mariano,

 

 

I see that your site uses, or used to use, 'pagespeed'   (mod_pagespeed on apache?)

 

From your code you copied above:

 

alt="Kryvaline Daubers" title="Kryvaline Daubers" class="img-thumbnail" pagespeed_url_hash="3435436302" onload="pagespeed.CriticalImages.checkImageForCriticality(this);

 

 

Not familiar with this myself, but it looks like this (apache) module speeds up the loading of the page, by directly inserting the image code in the code itself, to save server requests or so.

 

Can it be you should (re-)install this module on the server? Or turn it on or so?

 

 

My 2 cents,

pascal

Link to comment
Share on other sites

  • 2 weeks later...

Hi PascalVG, thanks for all the suggestions and follow up.

 

I ended up deleting the image folder & recreating it, clearing out the the images in SQL and manually re-uploaded them in the BO. This ended up solving the two issues (though the thumbnail issues remained for a few days, they now appear as normal ... possibly a cache issue with mod_pagespeed).

 

Thanks again.

 

Mariano.

Edited by Marianosc (see edit history)
Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...

I have the same problem.

I did look at the thumbnail-link that is not working in my cart with the element-inspector like Pascal suggested.

 

The problem is the https prefix!

If I edit that to http the thumbnail is being showed.

 

I can tackle this in two ways:

1. Get HTTPS to work (it is a local (home) server. Still testing and don't know how to activate SSL.

2. Get the URL's right in the Cart.

 

Anyone?

Edited by BertGr (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...