# Shopware Migration-Tool von XTC: Beim Importieren der Bilder ist ein Fehler aufgetreten

**URL:** <https://forum.shopware.com/t/shopware-migration-tool-von-xtc-beim-importieren-der-bilder-ist-ein-fehler-aufgetreten/60464>\
**Category:** Allgemein\
**Created:** [16. Juli 2019 um 13:26 UTC](https://forum.shopware.com/t/shopware-migration-tool-von-xtc-beim-importieren-der-bilder-ist-ein-fehler-aufgetreten/60464 "2019-07-16T13:26:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FloC3](https://avatars.discourse-cdn.com/v4/letter/f/838e76/32.png) [@FloC3](https://forum.shopware.com/u/FloC3)\
**Post date:** [16. Juli 2019 um 13:26 UTC](https://forum.shopware.com/t/shopware-migration-tool-von-xtc-beim-importieren-der-bilder-ist-ein-fehler-aufgetreten/60464/1 "2019-07-16T13:26:15Z")

</div>

Wir möchten Artikel aus unsrem alten XTc Veyton Shop importieren mit dem offiziellen Migration-Tool in Shopware 5.5.10.

```
Beim Importieren der Bilder ist ein Fehler aufgetreten

Code : 0
Line : 92
File : /home/xxxxxx/shopware/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php

Error : A new entity was found through the relationship 'Shopware\Models\Article\Image#media' that was not configured to cascade persist operations for entity: media/image/tempartikelbildGxm4Ps2bAgD3o.jpg. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).
Trace : #0 /home/xxxxxx/shopware/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(852): Doctrine\ORM\ORMInvalidArgumentException::newEntityFoundThroughRelationship(Array, Object(Shopware\Proxies\ __CG__ \Shopware\Models\Media\Media)) #1 /home/xxxxxx/shopware/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(740): Doctrine\ORM\UnitOfWork->computeAssociationChanges(Array, Object(Shopware\Proxies\ __CG__ \Shopware\Models\Media\Media)) #2 /home/xxxxxx/shopware/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(802): Doctrine\ORM\UnitOfWork->computeChangeSet(Object(Doctrine\ORM\Mapping\ClassMetadata), Object(Shopware\Models\Article\Image)) #3 /home/xxxxxx/shopware/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(340): Doctrine\ORM\UnitOfWork->computeChangeSets() #4 /home/xxxxxx/shopware/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(356): Doctrine\ORM\UnitOfWork->commit(NULL) #5 /home/xxxxxx/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/ImageImporter.php(129): Doctrine\ORM\EntityManager->flush() #6 /home/xxxxxx/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/Import.php(187): Shopware\SwagMigration\Components\DbServices\Import\ImageImporter->importArticleImage(Array) #7 /home/xxxxxx/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Image.php(141): Shopware\SwagMigration\Components\DbServices\Import\Import->articleImage(Array) #8 /home/xxxxxx/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(444): Shopware\SwagMigration\Components\Migration\Import\Resource\Image->run() #9 /home/xxxxxx/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(479): Shopware_Controllers_Backend_SwagMigration->runImport('import_images') #10 

```

manchmal taucht dieser Fehler auf und der Import bricht danach ab. An was kann das liegen??? Ich habe keine Plugins im Einsatz und auch nix am Code verändert.

das betroffene Bild ist scheinbar immer ein anderes.

---

<div class="post-metadata">

**Author:** ![FloC3](https://avatars.discourse-cdn.com/v4/letter/f/838e76/32.png) [@FloC3](https://forum.shopware.com/u/FloC3)\
**Post date:** [18. Juli 2019 um 07:50 UTC](https://forum.shopware.com/t/shopware-migration-tool-von-xtc-beim-importieren-der-bilder-ist-ein-fehler-aufgetreten/60464/2 "2019-07-18T07:50:32Z")

</div>

bitte um hilfe

---

<div class="post-metadata">

**Author:** ![FloC3](https://avatars.discourse-cdn.com/v4/letter/f/838e76/32.png) [@FloC3](https://forum.shopware.com/u/FloC3)\
**Post date:** [23. Juli 2019 um 09:16 UTC](https://forum.shopware.com/t/shopware-migration-tool-von-xtc-beim-importieren-der-bilder-ist-ein-fehler-aufgetreten/60464/3 "2019-07-23T09:16:25Z")

</div>

?

---

<div class="post-metadata">

**Author:** ![Tammo](https://avatars.discourse-cdn.com/v4/letter/t/e0b2c6/32.png) [@Tammo](https://forum.shopware.com/u/Tammo)\
**Post date:** [7. August 2019 um 10:12 UTC](https://forum.shopware.com/t/shopware-migration-tool-von-xtc-beim-importieren-der-bilder-ist-ein-fehler-aufgetreten/60464/4 "2019-08-07T10:12:24Z")

</div>

Habe dsa gleiche Problem aber beim Import von xt:modified.

Komme leider auch nicht weiter.&nbsp;

Der Aufruf im Imageimporter beinhaltet sogar persist

&nbsp; &nbsp; &nbsp; &nbsp; $this-\>em-\>persist($media);  
&nbsp; &nbsp; &nbsp; &nbsp; $this-\>em-\>persist($article);  
&nbsp; &nbsp; &nbsp; &nbsp; $this-\>em-\>persist($articleImage);  
&nbsp; &nbsp; &nbsp; &nbsp; $this-\>em-\>flush();  
&nbsp;
