Closed piotrekkaminski closed 6 years ago
From @EnricoB3 on April 13, 2017 14:11
Same issue. The image is imported as text.
From @jroca22 on May 8, 2017 20:32
Ciao EnricoB3, I've just imported this field with the full final path to image. This attribute value is a string so I did this workaround. If you find any other solution please share. Regrds,
From @mukdam on May 9, 2017 9:27
I have the same error. Create an attribute which "Catalog Input Type for Store Owner" media images. When I add addtional_attributes assign value but not import
From @amaddatu on August 2, 2017 16:13
I have experienced a very similar issue. I have had to make a workaround. I overwrote the import class at \Magento\CatalogImportExport\Model\Import\Product with my own class preference in a module. I added a new constructor that calls the function below. My new image attribute was 'some_new_image'. I hope this helps someone out there.
function _initImageArrayKeys(){ $this->_imagesArrayKeys = ['image', 'small_image', 'thumbnail', 'swatch_image', 'some_new_image', '_media_image']; }
My guess is that the protected variable _imagesArrayKeys should actually be pulling from image types data instead of hardcoded arrays.
From @okorshenko on September 7, 2017 20:22
@jroca22 thank you for your report. Please use the issue reporting guidelines to report an issue. Include the preconditions, the steps required to reproduce, the actual result, and the expected result. Please, add the following information:
From @magento-engcom-team on October 12, 2017 8:30
@jroca22, thank you for your report. We've created internal ticket(s) MAGETWO-81719 to track progress on the issue.
From @NormAtHuemor on October 16, 2017 13:41
Hi, @amaddatu . Would you mind going into further detail on how you implemented the override of the import class constructor? I've set up an override in an extension based on your comment above. However, during the compile process I receive the following error:
Errors during compilation: Vendor\Extension\Model\Import\Product Missed required argument eventManager in parent::__construct call.
From @amaddatu on October 22, 2017 9:27
@NormAtHuemor I wouldn't mind at all. Here are my Module Files In the di.xml I created a class preference for my override /etc/di.xml
I made sure that the Magento_CatalogImportExport module was loaded before my module would override. /etc/module.xml
Added my new init function in Product.php and created a new constructor override here. The constructor is nearly an exact copy of the one inside of the original class. The Imports at the top of the file were also copied from the original class. What I did add was the init function call as I stated previously that would overwrite the object's variable. /Model/Import/Product.php
function _initImageArrayKeys(){ $this->_imagesArrayKeys = ['image', 'small_image', 'thumbnail', 'swatch_image', 'some_new_image', '_media_image']; }
You can see my files below. ImageImportWorkaround(VendorAgnostic)2.zip
From @amaddatu on October 22, 2017 9:46
Also, I have confirmed that the issue does exist in my Magento version 2.1.8, and that my workaround is for that version, however, it may work in others.
Magento ver. 2.1.8
Hello @piotrekkaminski, Any news on this issue?
This has been fixed in 2.3-develop
as part of the PR https://github.com/magento-engcom/import-export-improvements/pull/94
Hi guys,
I made composer module based on a solution at https://github.com/magento-engcom/import-export-improvements/pull/94/ and it seems works for our store. It is only for the version from 2.2.4 and less than 2.3 where the assumption that it would be fixed in the 2.3.0 release. If it won't be then I will update composer dependencies.
Feel free to use it it would help your stores: https://github.com/sashas777/magento224-issue9171
From @jroca22 on April 7, 2017 19:58
I've created a custom image attribute and added to my attribute set as image. The thing is that when you try to import the attribute the same way you import images vis csv it only writes the value as text.
Preconditions
Magento 2.2.0
Steps to reproduce
Expected result
Actual result
Why is this attributed not treated the same way an image attribute created by the system?
Copied from original issue: magento/magento2#9171