Paypal Problem (duplizierte shops)

Hallo ihr Lieben!

Ich hoffe, jemand kann mir vielleicht mit folgendem Problem helfen:
Eine gute Bekannte ist an mich herangetreten, weil sie einen Shopware (5) Shop betreibt und mit dem, der ihn vorher betreut hat, absolut nicht zufrieden war (lange Geschichte, tl;dr er verlangte immer mehr Geld und der Shop pfeift aus dem letzten Loch).
Nun bin ich zwar ein erfahrener Front- & Backend Developer, bei Shopware bin ich allerdings auch neu, insofern ist das eine „learn as you go“ experience und ich bin für jede Hilfe dankbar :slight_smile:

Also, eines der großen Probleme:
Der englische Subshop wurde X-tausend-fach vervielfältigt. Dem konnte ich erst mal einen Riegel vorschieben, indem ich im s_core_shops Table „name“ auf Unique setzte. Dadurch zeigt sich auch der Übeltäter:

[11-Dec-2022 22:36:04 Europe/Berlin] PHP Fatal error:  Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'english' for key 'name' in /var/www/XXX/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:168
Stack trace:
#0 /var/www/XXX/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(168): PDOStatement->execute()
#1 /var/www/XXX/web/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(287): Doctrine\DBAL\Statement->execute()
#2 /var/www/XXX/web/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1087): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts()
#3 /var/www/XXX/web/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(400): Doctrine\ORM\UnitOfWork->executeInserts()
#4 /var/www/XXX/web/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(359): Doctrine\ORM\UnitOfWork->commit()
#5 /var/www/XXX/web/custom/plugins/SwagBundle/Services/Calculation/BundleBasketDiscount.php(159): Doctrine\ORM\EntityManager->flush()
#6 /var/www/XXX/web/custom/plugins/SwagBundle/Components/BundleComponent.php(234): SwagBundle\Services\Calculation\BundleBasketDiscount->updateBundleBasketDiscount()
#7 /var/www/XXX/web/custom/plugins/SwagBundle/Subscriber/Checkout.php(232): SwagBundle\Components\BundleComponent->updateBundleBasketDiscount()
#8 /var/www/XXX/web/engine/Library/Enlight/Event/Handler/Default.php(87): SwagBundle\Subscriber\Checkout->onGetBasket()
#9 /var/www/XXX/web/engine/Library/Enlight/Event/EventManager.php(214): Enlight_Event_Handler_Default->execute()
#10 /var/www/XXX/web/engine/Library/Enlight/Hook/HookExecutionContext.php(98): Enlight_Event_EventManager->notify()
#11 /var/www/XXX/web/engine/Library/Enlight/Hook/HookManager.php(180): Enlight_Hook_HookExecutionContext->execute()
#12 /var/www/XXX/web/var/cache/production_202003031106/proxies/sBasketProxy.php(126): Enlight_Hook_HookManager->executeHooks()
#13 /var/www/XXX/web/custom/plugins/SwagPaymentPayPalUnified/Subscriber/ExpressCheckout.php(116): Shopware_Proxies_sBasketProxy->sGetBasket()
#14 /var/www/XXX/web/engine/Library/Enlight/Event/Handler/Default.php(87): SwagPaymentPayPalUnified\Subscriber\ExpressCheckout->addExpressCheckoutButtonCart()
#15 /var/www/XXX/web/engine/Library/Enlight/Event/EventManager.php(214): Enlight_Event_Handler_Default->execute()
#16 /var/www/XXX/web/engine/Library/Enlight/Controller/Action.php(211): Enlight_Event_EventManager->notify()
#17 /var/www/XXX/web/engine/Library/Enlight/Controller/Dispatcher/Default.php(478): Enlight_Controller_Action->dispatch()
#18 /var/www/XXX/web/engine/Shopware/Kernel.php(198): Enlight_Controller_Dispatcher_Default->dispatch()
#19 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel->handle()
#20 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(453): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
#21 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(261): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
#22 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(426): Shopware\Components\HttpCache\AppCache->forward()
#23 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(317): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
#24 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(188): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup()
#25 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache->lookup()
#26 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
#27 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php(96): Shopware\Components\HttpCache\AppCache->handle()
#28 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(589) : eval()'d code(15): Symfony\Component\HttpKernel\HttpCache\AbstractSurrogate->handle()
#29 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(589): eval()
#30 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(195): Symfony\Component\HttpKernel\HttpCache\HttpCache->restoreResponseBody()
#31 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
#32 /var/www/XXX/web/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle()
#33 {main}

Next Doctrine\DBAL\DBALException: An exception occurred while executing 'INSERT INTO s_core_shops (main_id, category_id, name, title, position, host, base_path, base_url, hosts, secure, template_id, `default`, active, customer_scope, document_template_id, locale_id, currency_id, customer_group_id, fallback_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, 645, "english", "XXX PRODUCTS", 1, null, null, "\/en", "", 0, 22, 0, 1, 0, 22, 2, 1, 1, null]:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'english' for key 'name' in /var/www/XXX/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:179
Stack trace:
#0 /var/www/XXX/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(150): Doctrine\DBAL\DBALException::wrapException()
#1 /var/www/XXX/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(177): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#2 /var/www/XXX/web/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(287): Doctrine\DBAL\Statement->execute()
#3 /var/www/XXX/web/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1087): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts()
#4 /var/www/XXX/web/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(400): Doctrine\ORM\UnitOfWork->executeInserts()
#5 /var/www/XXX/web/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(359): Doctrine\ORM\UnitOfWork->commit()
#6 /var/www/XXX/web/custom/plugins/SwagBundle/Services/Calculation/BundleBasketDiscount.php(159): Doctrine\ORM\EntityManager->flush()
#7 /var/www/XXX/web/custom/plugins/SwagBundle/Components/BundleComponent.php(234): SwagBundle\Services\Calculation\BundleBasketDiscount->updateBundleBasketDiscount()
#8 /var/www/XXX/web/custom/plugins/SwagBundle/Subscriber/Checkout.php(232): SwagBundle\Components\BundleComponent->updateBundleBasketDiscount()
#9 /var/www/XXX/web/engine/Library/Enlight/Event/Handler/Default.php(87): SwagBundle\Subscriber\Checkout->onGetBasket()
#10 /var/www/XXX/web/engine/Library/Enlight/Event/EventManager.php(214): Enlight_Event_Handler_Default->execute()
#11 /var/www/XXX/web/engine/Library/Enlight/Hook/HookExecutionContext.php(98): Enlight_Event_EventManager->notify()
#12 /var/www/XXX/web/engine/Library/Enlight/Hook/HookManager.php(180): Enlight_Hook_HookExecutionContext->execute()
#13 /var/www/XXX/web/var/cache/production_202003031106/proxies/sBasketProxy.php(126): Enlight_Hook_HookManager->executeHooks()
#14 /var/www/XXX/web/custom/plugins/SwagPaymentPayPalUnified/Subscriber/ExpressCheckout.php(116): Shopware_Proxies_sBasketProxy->sGetBasket()
#15 /var/www/XXX/web/engine/Library/Enlight/Event/Handler/Default.php(87): SwagPaymentPayPalUnified\Subscriber\ExpressCheckout->addExpressCheckoutButtonCart()
#16 /var/www/XXX/web/engine/Library/Enlight/Event/EventManager.php(214): Enlight_Event_Handler_Default->execute()
#17 /var/www/XXX/web/engine/Library/Enlight/Controller/Action.php(211): Enlight_Event_EventManager->notify()
#18 /var/www/XXX/web/engine/Library/Enlight/Controller/Dispatcher/Default.php(478): Enlight_Controller_Action->dispatch()
#19 /var/www/XXX/web/engine/Shopware/Kernel.php(198): Enlight_Controller_Dispatcher_Default->dispatch()
#20 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel->handle()
#21 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(453): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
#22 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(261): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
#23 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(426): Shopware\Components\HttpCache\AppCache->forward()
#24 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(317): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
#25 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(188): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup()
#26 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(192): Shopware\Components\HttpCache\AppCache->lookup()
#27 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
#28 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php(96): Shopware\Components\HttpCache\AppCache->handle()
#29 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(589) : eval()'d code(15): Symfony\Component\HttpKernel\HttpCache\AbstractSurrogate->handle()
#30 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(589): eval()
#31 /var/www/XXX/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(195): Symfony\Component\HttpKernel\HttpCache\HttpCache->restoreResponseBody()
#32 /var/www/XXX/web/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
#33 /var/www/XXX/web/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle()
#34 {main}
  thrown in /var/www/XXX/web/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php on line 179

Wie kommt’s, dass das PayPal-Plugin shops dupliziert (übrigens nur den englischen Language-shop, nicht den deutschen Hauptshop) und hat jemand eine Ahnung, was man dagegen machen kann?
Zudem gibt’s auch sporadische Probleme mit Bezahlungen, die zwar abgewickelt werden, aber die entsprechenden Bestellungen sind komplett nicht im System (könnte wohl auch damit zusammenhängen).

Shopware Version: 5.6.6
PayPal Plugin Version: 4.3.2
(Ich weiß, veraltet, aber bei all den Fehlern, die der shop so wirft, ist ein Upgrade fast schon ein unberechenbares Risiko; geplant ist, so schnell wie möglich auf Shopware 6 zu migrieren, bis dahin muss aber der Shop noch irgendwie laufen).

Vielen Dank für Eure Hilfe!
-Chris

Hallo,

der übeltäter ist das Bundle Plugin… Das solltest du updaten. Dann ist das Problem zumindest gelöst.

1 „Gefällt mir“

Super, das war’s! Vielen, vielen Dank @d.garding

1 „Gefällt mir“