SqlContentEntityStorageException

Created on 11 January 2021, over 4 years ago
Updated 13 May 2025, 2 days ago

Problem/Motivation

content_sync throw an exception with commerce checkout flow
When click on "pay", got the following SqlContentEntityStorageException

The website encountered an unexpected error. Please try again later.

Drupal\Core\Entity\EntityStorageException: Object support when dumping a YAML file has been disabled. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 846 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Symfony\Component\Yaml\Dumper->dump(Object, 9223372036854775804, 0, 16) (Line: 153)
Symfony\Component\Yaml\Dumper->dump(Array, 9223372036854775805, 4, 16) (Line: 153)
Symfony\Component\Yaml\Dumper->dump(Array, 9223372036854775806, 2, 16) (Line: 153)
Symfony\Component\Yaml\Dumper->dump(Array, 9223372036854775807, 0, 16) (Line: 22)
Drupal\Component\Serialization\YamlSymfony::encode(Array) (Line: 27)
Drupal\Component\Serialization\Yaml::encode(Array) (Line: 43)
Drupal\content_sync\Encoder\YamlEncoder->encode(Array, 'yaml', Array) (Line: 40)
Symfony\Component\Serializer\Encoder\ChainEncoder->encode(Array, 'yaml', Array) (Line: 276)
Symfony\Component\Serializer\Serializer->encode(Array, 'yaml', Array) (Line: 119)
Symfony\Component\Serializer\Serializer->serialize(Array, 'yaml', Array) (Line: 35)
Drupal\content_sync\Exporter\ContentExporter->exportEntity(Object, Array) (Line: 218)
content_sync_entity_update(Object)
call_user_func_array('content_sync_entity_update', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_update', Array) (Line: 206)
Drupal\Core\Entity\EntityStorageBase->invokeHook('update', Object) (Line: 843)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('update', Object) (Line: 100)
Drupal\commerce\CommerceContentEntityStorage->invokeHook('update', Object) (Line: 535)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, 1) (Line: 728)
Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, 1) (Line: 460)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 837)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 395)
Drupal\Core\Entity\EntityBase->save() (Line: 117)
Drupal\commerce_license\EventSubscriber\LicenseOrderSyncSubscriber->onCartOrderTransition(Object, 'commerce_order.place.pre_transition', Object)
call_user_func(Array, Object, 'commerce_order.place.pre_transition', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('commerce_order.place.pre_transition', Object) (Line: 353)
Drupal\state_machine\Plugin\Field\FieldType\StateItem->dispatchTransitionEvent('pre_transition') (Line: 314)
Drupal\state_machine\Plugin\Field\FieldType\StateItem->preSave() (Line: 233)
Drupal\Core\Field\FieldItemList->delegateMethod('preSave') (Line: 191)
Drupal\Core\Field\FieldItemList->preSave() (Line: 881)
Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('preSave', Object) (Line: 831)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 100)
Drupal\commerce\CommerceContentEntityStorage->invokeHook('presave', Object) (Line: 111)
Drupal\commerce_order\OrderStorage->invokeHook('presave', Object) (Line: 500)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 700)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 454)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 837)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 395)
Drupal\Core\Entity\EntityBase->save() (Line: 196)
Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowBase->redirectToStep('complete') (Line: 180)
Drupal\commerce_payment\Plugin\Commerce\CheckoutPane\PaymentProcess->buildPaneForm(Array, Object, Array) (Line: 542)
Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm(Array, Object, 'payment')
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('commerce_checkout_flow_multistep_default', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 219)
Drupal\Core\Form\FormBuilder->getForm(Object, 'payment') (Line: 94)
Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
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: 50)
Drupal\ban\BanMiddleware->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: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

ths object throwing the error

$value object [Drupal\commerce_order\Adjustment]
type "tax"
label "VAT"
amount object [Drupal\commerce_price\Price]
number "6.60"
currencyCode "EUR"
percentage "0.2"
sourceId "eu|fr|standard"
included true
locked false

what is content_sync doing in the middle of commerce checkout flow ?

Steps to reproduce

I just configured a "basic" commerce setup with commerce_license for a role, recuring, and stripe as payment gateway
Drupal core 8.9.11
Drupal Commerce 8.x-2.22

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇫🇷France bachbach Le Havre

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