Displaying error when opening/proceeding with the product page after changing the currency - Multicurrency

Created on 11 July 2019, almost 6 years ago
Updated 18 May 2025, 19 days ago

Hi, I am using Drupal Commerce for my site which has multiple currency options. Installed Currency Resolver module to manage the multiple currency. Presently, two currencies (Dollar, Danish) are enabled in the site. Configured Danish as the default currency. While switching between these two currencies, it displays this error

Drupal - 8.7.3, Commerce - 2

The website encountered an unexpected error. Please try again later.Drupal\Core\Entity\EntityStorageException: in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 847 of core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php).

Drupal\commerce_price\Price->add(Object) (Line: 405)
Drupal\commerce_order\Entity\Order->recalculateTotalPrice() (Line: 311)
Drupal\commerce_order\Entity\Order->addAdjustment(Object) (Line: 77)
Drupal\commerce_shipping\ShipmentOrderProcessor->process(Object) (Line: 155)
Drupal\commerce_order\OrderRefresh->refresh(Object) (Line: 119)
Drupal\commerce_order\OrderStorage->doOrderPreSave(Object) (Line: 100)
Drupal\commerce_order\OrderStorage->invokeHook('presave', Object) (Line: 492)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 692)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 446)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 838)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 394)
Drupal\Core\Entity\EntityBase->save() (Line: 152)
Drupal\commerce_order\OrderStorage->postLoad(Array) (Line: 299)
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 232)
Drupal\commerce_cart\CartProvider->loadCartData(Object) (Line: 184)
Drupal\commerce_cart\CartProvider->getCartIds(NULL) (Line: 172)
Drupal\commerce_cart\CartProvider->getCarts() (Line: 221)
Drupal\commerce_cart\Plugin\Block\CartBlock->getCacheTags() (Line: 46)
Drupal\block\BlockViewBuilder->viewMultiple(Array, 'full', NULL) (Line: 31)
Drupal\block\BlockViewBuilder->view(Object) (Line: 151)
Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 259)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🐛 Bug report
Status

Active

Version

2.0

Component

Commerce

Created by

🇮🇳India Mohan6695

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024