Skip to content
Snippets Groups Projects
Commit 0c682283 authored by Jules's avatar Jules Committed by Thomas Secher
Browse files

Issue #3349741 by juliobasito: Images are not well imported on text fields

parent 6cecad4a
No related branches found
Tags 1.0.0-alpha19
1 merge request!5Issue #3349741 by juliobasito: Images are not well imported on text fields
......@@ -84,7 +84,7 @@ class FieldItemListProcessor extends TypeProcessorBase {
$plugin = $this->pluginManager->getInstanceByEntityType($file->getEntityTypeId());
if ($fileGid = $plugin->export($file)) {
$data[$key] = str_replace($file->uuid(), $fileGid, $data[$key]);
$data['included_images'] = $fileGid;
$data['included_images'][] = $fileGid;
}
}
}
......@@ -96,7 +96,13 @@ class FieldItemListProcessor extends TypeProcessorBase {
if (array_key_exists($property_id, $data)) {
foreach ($data[$property_id] as $item) {
if (array_key_exists('included_images', $item)) {
$this->importIncludedImage($item['included_images'], $item);
if (is_array($item['included_images'])) {
foreach ($item['included_images'] as $image) {
$this->importIncludedImage($image, $item);
}
} else {
$this->importIncludedImage($item['included_images'], $item);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment