Import products fails when additional_images uses a value separator different than ","
System -> Export and export all products .csv fileEdit additional_images field to separate images using ";" instead.

Go to `System -> Import``
Edit following configuration: (See screenshot)
;pub/media/catalog/productPress button Check File
File check is successful
Error: Wrong url/path used for attribute additional_images
Attached screenshot

The source of the Bug is the following:
The value used to explode the filename values is different during validation and import steps
Validation Step:
\Magento\CatalogImportExport\Model\Import\Product\Validator\Media
public function isValid($value)
{
//...
foreach (explode(self::ADDITIONAL_IMAGES_DELIMITER, $value[self::ADDITIONAL_IMAGES]) as $image) {
//...
}
}
Import Step:
\Magento\CatalogImportExport\Model\Import\Product
public function getImagesFromRow(array $rowData)
{
//...
$images[$column] = array_unique(
explode($this->getMultipleValueSeparator(), $rowData[$column])
);
//...
$labels[$column] = explode($this->getMultipleValueSeparator(), $rowData[$column . '_label']);
//...
}
When the Value separator configured for the import is different than "," the validation goes through but the import fails because the value separator used for the explode is not a coma.
Please use the same separator for "additional_images" everywhere.
We also noticed that the separator for the export uses another different constant. From my point of view, here we should also use the same constant.
\Magento\CatalogImportExport\Model\Export\Product
private function appendMultirowData(&$dataRow, &$multiRawData)
{
//...
$dataRow['additional_images'] = implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImages);
$dataRow['additional_image_labels'] = implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalImageLabels);
//...
}
I agree on this one, I was about to import a large file and I was surprised that the additional_images column was not using the same delimiter. Although easy to figure out, to prevent confusion the same Multiple value separator should be used throughout the CSV file.
Yep, got same issue, delimiter for additonal_images is hardcoded => coma. but getImagesFromRow(array $rowData) using $this->getMultipleValueSeparator().
Same issue here, the self::ADDITIONAL_IMAGES_DELIMITER is really causing confusing.
So the interim solution is: in magento/module-catalog-import-export/Model/Import/Product/Validator/Media.php:
Change the hard coded image delimiter to:
const ADDITIONAL_IMAGES_DELIMITER = '|';
Or rewrite that file
@jalogut Can you propose a solution that get's the multiple value delimiter?
I'm having the same issue in Magento ver. 2.1.4.
My solution was to rewrite the file and edit the
const ADDITIONAL_IMAGES_DELIMITER = '|';
Rewrite in di.xml:
<preference for="Magento\CatalogImportExport\Model\Import\Product\Validator\Media" type="Project\Import\CatalogImportExport\Model\Import\Product\Validator\Media" />
Already 2 PRs are available to fix this one > https://github.com/magento/magento2/pull/6774 & https://github.com/magento/magento2/pull/5082
As mentioned on PR #5082 this issue is already fixed in current develop branch: