Quote:
Originally Posted by Kirk Fitzgerald
I enable curl in localhost xampp and ran that script, now there are NO images for the Products already listed, the add image from an url is gone too, all I have open to me now is to upload a new image!
This is no good at all for when upgrading my live site, why are the external linked images deleted?
|
When a local image is made, the old link is replaced... One product, one image path.
Essentially the script just sees an image field. Whether it's internal or external is irrelevant to a browser or the script and thus calling one field avoids having to check two places for images. Speed is good.
That said, in the syncing process there's a number of sanity checks in place so if an image doesn't load, isn't a valid type, etc it gets skipped over and the external link remains in place. The process runs one image through at a time to avoid any issues with something breaking mid-way and reloads after 25 images to avoid browser timeouts.
But critical errors can always throw curve balls so for beta 3 we're adding a field to store the old link. Just in case.
When you re-ran the script did it say there was nothing to process? Are all of the products now showing local paths?
You can query: SELECT productid,mainphoto,uploadimg FROM pf_products