Problem/Motivation

A regular checkout triggered the following exception.

IMHO that should not happen for users?

Path: /commerce-stripe/express-checkout/shipping-address-change/44294

Error:

Drupal\Core\Entity\EntityStorageException: Update existing 'commerce_shipment' entity while changing the ID is not supported. in Drupal\Core\Entity\ContentEntityStorageBase->doPreSave() (line 781 of /web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php).

Backtrace:

#0 /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(484): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave()
#1 /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(804): Drupal\Core\Entity\EntityStorageBase->save()
#2 /web/core/lib/Drupal/Core/Entity/EntityBase.php(370): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
#3 /web/modules/contrib/commerce_shipping/src/LateOrderProcessor.php(46): Drupal\Core\Entity\EntityBase->save()
#4 /web/modules/contrib/commerce/modules/order/src/OrderRefresh.php(209): Drupal\commerce_shipping\LateOrderProcessor->process()
#5 /web/modules/contrib/commerce/modules/order/src/OrderStorage.php(127): Drupal\commerce_order\OrderRefresh->refresh()
#6 /web/modules/contrib/commerce/modules/order/src/OrderStorage.php(90): Drupal\commerce_order\OrderStorage->doOrderPreSave()
#7 /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(530): Drupal\commerce_order\OrderStorage->invokeHook()
#8 /web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(767): Drupal\Core\Entity\EntityStorageBase->doPreSave()
#9 /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(484): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave()
#10 /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(804): Drupal\Core\Entity\EntityStorageBase->save()
#11 /web/modules/contrib/commerce/modules/order/src/OrderStorage.php(173): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
#12 /web/core/lib/Drupal/Core/Entity/EntityBase.php(370): Drupal\commerce_order\OrderStorage->save()
#13 /web/modules/contrib/commerce_stripe/src/Controller/ExpressCheckoutController.php(182): Drupal\Core\Entity\EntityBase->save()
#14 [internal function]: Drupal\commerce_stripe\Controller\ExpressCheckoutController->onShippingAddressChange()
#15 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#16 /web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#18 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#19 /vendor/symfony/http-kernel/HttpKernel.php(183): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#20 /vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#21 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#22 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#23 /web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#24 /web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#25 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#26 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass()
#27 /web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#28 /web/modules/contrib/crowdsec/src/Middleware.php(62): Drupal\ban\BanMiddleware->handle()
#29 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\crowdsec\Middleware->handle()
#30 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#31 /web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(53): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#32 /web/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#33 /web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle()
#34 /web/core/lib/Drupal/Core/DrupalKernel.php(715): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#35 /web/index.php(19): Drupal\Core\DrupalKernel->handle()
#36 {main}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
anybody’s picture

Any ideas how this can happen? What might be the root cause?