Kundenlogin und Registrierung funktioniert nicht mehr (Datenbankfehler)

*EDIT* So ich glaub ich hab das ein bischen zu kompliziert geschrieben. Ich versuchs besser auf den Punkt zu bringen ^^

Info: Ich hatte das Update von 5.2.9 wieder rückgängig gemacht auf 5.2.8, lief einfach gar nicht mehr.
Dann konnte ich den Bestellstatus nicht ändern, Fehlermeldung war ungefähr: Keine eindeutige Order ID gefunden." - Hab alte Testbestellungen gelöscht, dann gings wieder.
Danach funktioniert jetzt nichts mehr was die Kundendaten (Frontend/Backend) betrifft. Dh die Daten und Adressen sind alle da, aber es kann nichts geändert werden (auch Fehlermeldung).
Ich denk es liegt an den Attributes, wie ich auch in diesem Thread gelesen hab:

https://forum.shopware.com/discussion/22788/nach-update-fehler-no-mapping-found-for-field-customer

Wie kann ich Attributes neu generieren? Durchs manuelle Cache löschen ändert sich bei mir nix.

 

Mein Fehlermeldungen lauten

Bei Anmeldung bestehendes Konto:

No mapping found for field ‚customerAddress‘ on class ‚Shopware\Models\Attribute\CustomerAddress‘. in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php on line 163

Stack trace:

#0 vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(1238): Doctrine\ORM\Mapping\MappingException::mappingNotFound(‚Shopware\Models…‘, ‚customerAddress‘)
#1 engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(1287): Doctrine\ORM\Mapping\ClassMetadataInfo->getAssociationMapping(‚customerAddress‘)
#2 engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(1100): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->getSelectColumnsSQL()
#3 engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(740): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->getSelectSQL(Array, NULL, NULL, NULL, NULL, NULL)
#4 engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(760): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load(Array, Object(Shopware\Proxies__CG__\Shopware\Models\Customer\Address))
#5 vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php(187): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadById(Array, Object(Shopware\Proxies__CG__\Shopware\Models\Customer\Address))
#6 var/cache/production_201610051330/doctrine/proxies/__CG__ShopwareModelsCustomerAddress.php(108): Doctrine\ORM\Proxy\ProxyFactory->Doctrine\ORM\Proxy{closure}(Object(Shopware\Proxies__CG__\Shopware\Models\Customer\Address), ‚__load‘, Array)
#7 var/cache/production_201610051330/doctrine/proxies/__CG__ShopwareModelsCustomerAddress.php(108): Closure->__invoke(Object(Shopware\Proxies__CG__\Shopware\Models\Customer\Address), ‚__load‘, Array)
#8 engine/Shopware/Components/Model/ModelManager.php(125): Shopware\Proxies__CG__\Shopware\Models\Customer\Address->__load()
#9 engine/Shopware/Components/Model/ModelManager.php(178): Shopware\Components\Model\ModelManager->serializeEntity(Object(Shopware\Proxies__CG__\Shopware\Models\Customer\Address))
#10 engine/Shopware/Core/sAdmin.php(1578): Shopware\Components\Model\ModelManager->toArray(Object(Shopware\Proxies__CG__\Shopware\Models\Customer\Address))
#11 engine/Shopware/Core/sAdmin.php(3540): sAdmin->convertToLegacyAddressArray(Object(Shopware\Proxies__CG__\Shopware\Models\Customer\Address))
#12 engine/Shopware/Core/sAdmin.php(1461): sAdmin->getUserBillingData(‚1‘, Array)
#13 engine/Shopware/Controllers/Frontend/Account.php(64): sAdmin->sGetUserData()
#14 engine/Library/Enlight/Controller/Action.php(150): Shopware_Controllers_Frontend_Account->preDispatch()
#15 engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch(‚loginAction‘)
#16 engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#17 engine/Shopware/Kernel.php(177): Enlight_Controller_Front->dispatch()
#18 vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Enlight_Controller_Request_RequestHttp), 1, true)
#19 engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#20 vendor/symfony/http-kernel/HttpCache/HttpCache.php(444): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#21 vendor/symfony/http-kernel/HttpCache/HttpCache.php(344): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(Object(Symfony\Component\HttpFoundation\Request), true)
#22 engine/Shopware/Components/HttpCache/AppCache.php(178): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true)
#23 vendor/symfony/http-kernel/HttpCache/HttpCache.php(210): Shopware\Components\HttpCache\AppCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true)
#24 engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 shopware.php(113): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#26 {main}

 

Bei Registrierung:

Fatal error: Uncaught Error: Call to undefined method Shopware\Models\Attribute\CustomerAddress::setCustomerAddress() in /home/.sites/116/site2838013/web/webshop/engine/Shopware/Components/Model/ModelEntity.php:108 Stack trace: #0 /home/.sites/116/site2838013/web/webshop/engine/Shopware/Models/Customer/Address.php(441): Shopware\Components\Model\ModelEntity->setOneToOne(Object(Shopware\Models\Attribute\CustomerAddress), ‚\Shopware\Model…‘, ‚attribute‘, ‚customerAddress‘) #1 /home/.sites/116/site2838013/web/webshop/vendor/symfony/property-access/PropertyAccessor.php(605): Shopware\Models\Customer\Address->setAttribute(Object(Shopware\Models\Attribute\CustomerAddress)) #2 /home/.sites/116/site2838013/web/webshop/vendor/symfony/property-access/PropertyAccessor.php(201): Symfony\Component\PropertyAccess\PropertyAccessor->writeProperty(Array, ‚attribute‘, Object(Shopware\Models\Attribute\CustomerAddress)) #3 /home/.sites/116/site2838013/web/webshop/vendor/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php(93): S in /home/.sites/116/site2838013/web/webshop/engine/Shopware/Components/Model/ModelEntity.php on line 108 503 Service Unavailable

 

Danke!

So… ich hab gestern Abend noch die Contsraints der Adressen erneuert, hat dann zwar nicht gefunzt, aber da war ich anscheinend schon zu müde den Cache richtig zu löschen.

Hab heut morgen reingeschaut und plötzlich funzts über Nacht wieder :smiley:

 

Fazit: Wenn in der DB Datensätze durcheinander kommen isses blöd, aber nicht unlösbar. Einfach die offizielle Anleitung für die ForeignKeys befolgen und verwaiste Einträge entfernen. 

verwaiste ids bereinigen sql: DELETE FROM table WHERE id NOT IN(…)
https://forum.shopware.com/discussion/comment/173131/#Comment_173131
 

PS: außerdem hatte ich einen Fehler bei den Damen der Schöpfung. Hatte nach dem Import von Oxid die anrede mrs statt ms drinnen…

1 „Gefällt mir“