Jump to content

Moving Prestashop 1.4.6.2 - Wrong image path


Recommended Posts

Hi there,

 

I really hope someone can shed some light on this because I have tried everything I could find.

 

I have a live website that works fine. I duplicated this website to another server under another domain following the usual instructions.

 

Everything is fine excepting the images - some are displayed, some are not. It doesn't matter what I try: regenerate image, legacy system on / off etc...

 

The weird thing is this:

 

- The current website uses the legacy image system fine for instance:

/img/p/3319-4126-small.jpg

 

- The exact same product on the duplicated website uses the new system:

/img/p/4/1/2/6/4126-small.jpg

 

HOWEVER

 

Moving images to the new system works but only for a few images. Upon further investigation I have found this really strange behaviour:

 

On the test website, some images use the old path and some image use the new path! Please see attached screenshots.

 

Url rewriting is off, the htaccess file is the same as live website, cache is cleared. I'm out of ideas, if anyone can help I would be very grateful!

 

Thanks in advance

 

 

post-153780-0-17397600-1417108823_thumb.jpg

post-153780-0-55065500-1417108849_thumb.jpg

Link to comment
Share on other sites

Update: 

 

I re-downloaded all the image from the original website and re-uploaded the the test website in Binary mode. Still no luck.

 

I also tried step by step to see what's happening in the front end.

 

- After the transfer, the strange behaviour described above happens (some images use the old path, some use the new one).

- After moving the images (under "Preferences" > "Images") and disactivating the legacy file image system then all the images use the new path - however some images are missing on the server.

 

So maybe something goes wrong when the images are being moved to the new system? Is there any way to move the images in a different way?

 

Any pointers would be appreciated.

Link to comment
Share on other sites

I'm really running out of ideas. I tried to set all the image to 777 before moving and regenerating them and several other stuff with no luck. I still have a batch of photos showing and a batch of photos missing. 

 

Any help would be really appreciated!

Link to comment
Share on other sites

Finally some progress in my understanding:

 

On the LIVE website (where all the products are displayed properly) I can only see the product images up to a certain ID on the img/p folder.

 

Basically the last image I can find on the img/p folder is 2568-3282.jpg (referring to product ID 2568).

 

HOWEVER the shop has a lot more product than that, it goes up to product ID 3300 and +

 

I have checked on my test website and indeed all the products with a missing image have an ID above 2568.

 

Now my specific question is as follows: if these images are not under img/p on the live server then where are they??

 

Looking at the path on the front end does not give me a clue as the path is re-written (friendly url). I'm reluctant to turn off friendly url on the live website because I suspect a bug of some sort and I don't want the live website to be left with missing images!

 

Example of friendly url: /3319-4126-home/olpro-sanidry-dehumidifying-tray-white.jpg

 

So does anyone know where these images are or how I can find the real path of the image?

Link to comment
Share on other sites

Wow I have finally found the issue... Very unexpected and I haven't seen it mentioned anywhere on the web (trust me I tried everything lol)

The FTP had a limit of files that can be seen. When accessing my img/p/ folder only 10000 files would be displayed and the rest would simply not be shown anywhere. Even when transferring the whole p folder it would only take in account 10 000 files.

It came to my attention after seeing the message "226 Output truncated to 10000 matches" on my FTP client.

 

I have  contacted my hosting company and they have raised the limit to 25 000 so I can now see all the files and transfer them properly!

 

Hopefully it will be useful to someone else :)

 

[sOLVED]!

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...