Skip to content

Magento 2 import products with images using CSV Issue #10209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mayankzalavadia opened this issue Jul 11, 2017 · 15 comments
Closed

Magento 2 import products with images using CSV Issue #10209

mayankzalavadia opened this issue Jul 11, 2017 · 15 comments
Labels
bug report Component: ImportExport Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@mayankzalavadia
Copy link
Contributor

mayankzalavadia commented Jul 11, 2017

I'm trying to import a CSV file with new products that contain local images but I am receiving the error:

Preconditions

  1. Magento 2.1.7

Steps to reproduce

  1. Create simple product with image.
  2. Export this product to CSV.
  3. Try to import product with an image using csv.

Expected result

Product Import Successful.

Actual result

Got following error :
Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s):

@mayankzalavadia mayankzalavadia changed the title Magento 2 import products with images Issue Magento 2 import products with images using CSV Issue Jul 11, 2017
@kbrakband
Copy link

I have the same problem while I do have images in the pub/media/import folder and in the csv the images are written like this: 123456.jpg (without the path)

@magento-engcom-team magento-engcom-team added G1 Passed bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Sep 20, 2017
@magento-engcom-team
Copy link
Contributor

Description updated.

@magento-engcom-team
Copy link
Contributor

@mayankzalavadia, thank you for your report.
We've created internal ticket(s) MAGETWO-75633 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Sep 21, 2017
@Jens-S
Copy link

Jens-S commented Sep 26, 2017

I would like to work on this ticket.

@okorshenko
Copy link
Contributor

Hi @Jens-S
I've sent you an invitation to join Magento Team on public GitHub. Could you please accept the invitation?

@Jens-S
Copy link

Jens-S commented Sep 27, 2017

Sorry, but I want to pass this ticket back.

@mayankzalavadia
Copy link
Contributor Author

Hello @okorshenko

I also would like to give my contribution on Magento. So, can you please send me an invitation to join Magento Team on public GitHub.

@okorshenko
Copy link
Contributor

@mayankzalavadia invitation sent. Would like to work on this issue?

@mayankzalavadia
Copy link
Contributor Author

Yes I Would like to work on this issue.

@KarlDeux
Copy link

KarlDeux commented Nov 14, 2017

Cannot reproduce it on 2.2 dev.
Are you filling Images File Directory field from the admin/import tool?
If so, try not to fill it and use the CSV file exported as-is.

PS: if you still encounter issues i'd like to take care of this ticket.

@PieterCappelle
Copy link
Contributor

Can confirm. Can’t reproduce in 2.2 and 2.3.

@piotrekkaminski
Copy link
Contributor

This issue was moved to magento-engcom/import-export-improvements#83

@Lanot
Copy link

Lanot commented Mar 5, 2018

Hello Community!

I was able to reproduce the same error Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): when tried to import products with images. The images were located and really existed on 3rd party website, not in local foder.

The issue was related to HTTP Header, which my images returned when code asked for HTTP status per each image url.

The code expects status 200 OK, but in my case it was 301 Moved Permanently and that assumed as "Image Missing".

Hints:
Magento\Framework\Filesystem\Driver\Http::isExists()

if (strpos($status, '200 OK') === false) {
$result = false;
} else {
$result = true;
}

In our case we have done customization with following enhancement:
if (strpos($status, '200 OK') === false && strpos($status, '301 Moved Permanently') === false) {
$result = false;
} else {
$result = true;
}

Kind Regards,
Tolik

@valuead
Copy link

valuead commented Sep 17, 2018

Same error 2.2.5
in my pub/media/import i have the file with 777 permission both on the folder and the file.
in my csv I have only file name.
err

@gsa83
Copy link

gsa83 commented Oct 16, 2019

Note : When a magento is behind a Proxy for example, this code is causing issue because get_header is not properly implemented
here Magento\Framework\Filesystem\Driver\Http.php : isExists mail have the possibility to pass a $context variable to be able to pass for example a proxy to the get_header, which allow context to handle this problem
note : the context is passed on the function of the class....
Today the only solution is to override this class, which is bad solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: ImportExport Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests