Skip to content
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

Warning for unlink media folder breaks import #181

Open
akosglue opened this issue Mar 21, 2018 · 1 comment
Open

Warning for unlink media folder breaks import #181

akosglue opened this issue Mar 21, 2018 · 1 comment

Comments

@akosglue
Copy link

Hello,

I encountered recently the following problem:
I get this warning and the import is unfinished when executing: php magneto pimgento:import --code=product --file=product.csv

Warning: unlink(...../magento2/pub/media/): Is a directory in .....magento2/vendor/agencednd/module-pimgento/Product/Helper/Media.php on line 251

I suppose that the method deleteMediaFile is called somewhere with a parameter as empty string.

@akosglue
Copy link
Author

quick and dirty:

/vendor/agencednd/module-pimgento/Product/Model/Factory/Import/Media.php

around line 410 added, in clearImageCache method;

if($imagePath != '') { $this->_mediaHelper->deleteMediaFile($imagePath);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant