0

Now been at this for nearly 2 days...

Using Magento for years, never had this much trouble uploading images in bulk.

'Image does not exist' error when uploading a full product CSV with images attached. I have all images in media/import, all file names match, I have tried changing directory permissions, file permissions, trailing / on and off images. Have tried using Magmi, works fine for imports as long as images are not included..

Worth noting when the above error comes, no products will upload even without images... I have also found at different times the images are being assigned to products as within the product directories the image number directories have existed.

Only have 180-200 products, but 9 images per product, and the site needs to be update twice a day using CSV...

Really am lost for ideas now... very frustrating..

Let me know if i've missed anything!


Update... I have tried using a media_gallery header, CSV imports products not images, have tired using media/catalog/product/1/4 then image name, tried without / on file name, file names contain 3 underscores, have renamed images to remove them.. oddly some image have gone into media/catalog/product/1/4 directory though all of the above shows a 'image does not exist' error..

  • 1
    First of all check if you have 777 right on the media folder recursively. If that's already done, I don't have an idea on what's wrong, but I can give you a hint on where to start debugging. The error message you see comes from an exception thrown in Mage_Catalog_Model_Product_Attribute_Backend_Media::addImage. For some reason the $file = realpath($file); returns null or the file with that name does not exist. Try to log the values you get in that method and match them against the values you expect. – Marius Feb 4 '15 at 15:12
  • Ok, so for the third time today I have changed the permissions back to 777 from 755 and recursively through the directory.. havent ever debugged so ill try and see what I get.. – Nathan Butcher Feb 4 '15 at 15:23
  • @marius not sure I follow the rest of your reply, thanks for your help though... – Nathan Butcher Feb 4 '15 at 15:40
  • Do you have an example of the csv? and the images? in a zipfile ? – Evrijn Feb 4 '15 at 15:41
  • ngbmedia.co.uk/holden/afterchx.csv... csv is here..images are all sitting in the media/import folder...within csv image names are in place with / preceding the image name – Nathan Butcher Feb 4 '15 at 15:44
1

Please check your memory limit (variable memory_limit in .htaccess, php.ini or ask your hoster). It should be something like "512M". The following values are not accepted by Magento: -1 1G

I have seen exactly this causing errors like the one you mentioned.

  • ok thanks for your help limit is 64m or 256m? – Nathan Butcher Feb 4 '15 at 15:25
  • I recommend setting it to 512M or even 1024M for testing purposes. 64M is certainly too few. – Andreas von Studnitz Feb 4 '15 at 15:26
  • thanks for your help, but it made no difference – Nathan Butcher Feb 4 '15 at 15:41
1

Building on Marius's reply: PHP's realpath() function requires exec access to all directories in the entire tree, even the ones above the current directory.

If it doesn't, it returns false. You should be able to debug that value quite easily.

  • Good call. Why didn't I think of that? I bet this is the issue :). – Marius Feb 4 '15 at 15:20
  • Ensuring I have understood correctly media also needs to be 777... – Nathan Butcher Feb 4 '15 at 15:29
  • Update... I have tried using a media_gallery header, CSV imports products not images, have tired using media/catalog/product/1/4 then image name, tried without / on file name, file names contain 3 underscores, have renamed images to remove them.. oddly some image have gone into media/catalog/product/1/4 directory though all of the above shows a 'image does not exist' error.. – Nathan Butcher Feb 5 '15 at 8:59
  • Are you able to upload images via the backoffice? Have you checked your webserver error logs? And the Magento logs in var/logs/system.log or var/logs/exception.log? – dvdmierden Feb 5 '15 at 15:29
  • images upload fine manually will check logs – Nathan Butcher Feb 6 '15 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.