4

Firstly I export csv file from admin and keep only one row and delete the remaining row, after that I will change product name,category name and then import the file.I am getting the result in frontend. Similarly update the 52 rows of new category and product name, now stuck with one error

1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in rows: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

note: here I am not upload image folder because I dont want to change image, in csv I just change product name and category.

I have checked file permission, its fine (755).

check data also give success message, import only the problem. I think its minor fix.

anything I did wrong? how to solve the issue?

Thanks in advance

5
  • Did you solve this?
    – Carl Owens
    Jun 3, 2016 at 11:08
  • yes @CarlOwens. comment your issue if I know I will help you. Jun 3, 2016 at 11:23
  • I figured it out. Turns out the php memory limit was 256mb. Updated it to 2048mb and the import worked fine. There is no real error shown for this in magento 2. Logged the exception as per (mage2.pro/t/topic/1099) and discovered the issue.
    – Carl Owens
    Jun 3, 2016 at 13:58
  • great @CarlOwens. do you mean you can get same error what I get. You can resolved with php memory limit am I right. Jun 3, 2016 at 14:05
  • Yes I got the same error but it was due to php's memory limit within the php.ini config.
    – Carl Owens
    Jun 5, 2016 at 20:33

6 Answers 6

4

First time I had success because I set Allowed Error Counts to 10 while importing. My CSV file has only one row so it skipped the one error, Updated the details except image.

Second time I got an error because I have more than 10 rows.

Reason:

While importing, magento looks at images in the pub/media/import folder, but I left it as empty so instead it will throw the error I previously mentioned. After copying the image into pub/media/import my problem got solved.

note: suppose you need to change product name only, just remove the all the image value(leave as empty, don't need to mention the image URL).

1
  • 3
    Hmm this solution did not work in my case
    – tread
    Feb 28, 2017 at 14:16
2

For the import images issue i have fixed the issue from Uploader.php file. change below file path code and success working import images.

File path: magento/vendor/magento/module-catalog-import-export/Model/Import/Uploader.php

Find the below line from line number 201:

$filePath = $this->_directory->getRelativePath($filePath . $fileName);

Replace with:

$filePath = strpos($filePath, $fileName) !== false ? $filePath:$this->_directory->getRelativePath($filePath . $fileName);

For More information Refer github link:

https://github.com/magento/magento2/pull/20761/commits/8612789375b0c173f0ba852c587882af6ff8bc7f

8
  • I tried the above code in my localhost but still, I get the same error. So please give me a solution. Oct 1, 2019 at 12:16
  • Have you checked your CSV format it is proper or not. Oct 1, 2019 at 12:33
  • Yes csv proper on click and check It is perfect, Then after when click to import then this issue comes. I will fetch Image from ik.imagekit.io/bfrs/… Oct 1, 2019 at 12:36
  • Have you added that images individual full path to image field? Oct 1, 2019 at 12:38
  • yes I added already Oct 1, 2019 at 12:39
1

run the below commands on the magento root directory.

find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;

0

I had the same error while trying to import 250 products with images. The fix for me was to remove any spacial charecter from the file name not even comma or space anywhere in the image name. example - LCDwithTouchScreenforSamsungGalaxyS7edgeCDMABlackcompleteassemblyfolder.jpg and it worked.

0

Same problem. I solved renaming the directories, they had uppercase and lowercase (A-a) (B-b) (C-c) Etc..etc .. I set everything in lowercase, you must also check the CSV that is correct.

0

here is what helped me. look for path of php.ini file : php --ini change memory_limit to 2G in the php.ini file rename all images to image_*.JPG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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