pskypsky MitgliedKommentare: 3 Danke erhalten: 0 Mitglied seit: August 2018
Fatal error: Uncaught Doctrine\ORM\Mapping\MappingException: The target-entity Shopware\Models\Attribute\Order cannot be found in 'Shopware\Models\Order\Order#attribute'. in /shopware/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php:762 Stack trace: #0 /shopware/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(1028): Doctrine\ORM\Mapping\MappingException::invalidTargetEntityClass('Shopware\\Models...', 'Shopware\\Models...', 'attribute') #1 /shopware/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(272): Doctrine\ORM\Mapping\ClassMetadataInfo->validateAssociations() #2 /shopware/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(251): Doctrine\ORM\Mapping\ClassMetadataFactory->validateRuntimeMetadata(Object(Doctrine\ORM\Mapping\ClassMetadata), NULL) #3 /shopware/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(332): Doctrine\ORM\Mapping\ClassMetadataFactory->doLoadMetadata(Object(Doctrine\ORM\Mapping\C in /shopware/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php on line 762

I keep getting this when i login. what could be the issue and how can i solve it.


  • PStadtfeldPStadtfeld MitgliedKommentare: 359 Danke erhalten: 90 bearbeitet September 2018 Mitglied seit: August 2017

    Sounds fishy, there is no "Order" under "engine/shopware/models/attribute" by default.
    If I had to make a guess I'd say you installed a plugin which either didn't finish installing properly or a plugin that you deinstalled didn't entirely finish it's job and left code behind which causes problems now.

    Since the link seems to be located in "models/order/order.php" you could try to replace the "order.php" from your current installation with a fresh standard file from a basic shopware install folder.

    Best to keep a copy of the current one (even if it causes problems) so you can swap it back in case the standard file causes even more problems after the exchange.
    Just rename it to "Order.php_trouble" or move it from your shopware installation to a local folder while testing.

    Obviously it'd be best if you had a mirrored test system where you can swap around files without interrupting with the live system but if the error occurs for all users I doubt you can do much more harm anyways..

    Should always create a full backup before fiddling with the life system at all times.


    - Somethimes clearing the cache can help too. Go to the backend 'n hit Cache & Performance, then Cache, check all boxes 'n proceed. Next you can try to delete the productions-folder at "httpdocs/var/cache", then clear cache in the backend again 'n try to relog on the frontend..

  • Moritz NaczenskiMoritz Naczenski AdministratorKommentare: 6625 Danke erhalten: 1974 Mitglied seit: September 2013

    Please check the foreign keys of your database, sound like a database issue.

  • pskypsky MitgliedKommentare: 3 Danke erhalten: 0 Mitglied seit: August 2018

    i finally got the issue i had. there was a mixup of databases in my docker environment and the somehow it was reading from a database of another installation. Undecided

Anmelden oder Registrieren, um zu kommentieren.