Import several media to an item

Hi

I have a csv file for a media import containing an Identifier and a URL - works fine.

But it seems like the CSV import just can import one (1) Media file per Item. Because after a while a got an error, I think, when it tried to import a second image to an Item:

==========================
Fatal error: Uncaught Doctrine\ORM\Exception\EntityManagerClosed: The EntityManager is closed. in /var/www/litografiska/vendor/doctrine/orm/lib/Doctrine/ORM/Exception/EntityManagerClosed.php:11
Stack trace:
#0 /var/www/litografiska/vendor/d…

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘44ce4431144b53475041d837f38c9a978f969f48’ for key ‘UNIQ_6A2CA10C5CC5DB90’ in /var/www/litografiska/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO

=================

I have a file like:

ID; URL
T1; https…1
T1; https.,2 (second file connected to T1)

How do I import more than one (1) image per item?

Thanks !!

Best,
//Staffan

Hi Staffan,

I also split the rows with multiple images in separate rows with the same identifier.

You create this file after the initial import of the items, without the media (or one media item).
The csv with identifier and images you use as a appending import (type media import).

In the media-specific data option you connect the ID to the already stored identifier of the object.
Don’t forget to change the import (in advanced settings) into an append import.

That should do the trick.

Cheers,
Hans Ruedisueli

I managed to do it later with Bulk Import, but I will try it in CSV Import

Thx, cheers!!
//Staffan Gerlöw

Last version of Bulk Import has many improvements to avoid this type of issues.