Problem/Motivation
After a fresh install of latest Drupal Commerce modules whenever I try to edit the default checkout flow, I get the following errors
[error] 1072#1072: *1 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception LogicException: "Settings can not be serialized. This probably means you are serializing an object that has an indirect reference to the Settings object. Adjust your code so that is not necessary." at /xxx/xxx/xxx/core/lib/Drupal/Core/Site/Settings.php line 68" while reading response header from upstream, client: 127.0.0.1, server: xxx.xxx, request: "POST /admin/commerce/config/checkout-flows/manage/default?ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm-one.sock:", host: "xxx.xxx", referrer: "https://xxx.xxx/admin/commerce/config/checkout-flows/manage/default"
In console, I keep getting these JS errors
Failed to load resource: the server responded with a status of 500 (500 Service unavailable (with message))
Uncaught
Drupal.AjaxError
message: "↵An AJAX HTTP error occurred.↵HTTP Result Code: 500↵Debugging information follows.↵Path: /admin/commerce/config/checkout-flows/manage/default?destination=/admin/commerce/config/checkout-flows&ajax_form=1↵StatusText: 500 Service unavailable (with message)↵ResponseText: The website encountered an unexpected error. Please try again later.LogicException: Settings can not be serialized. This probably means you are serializing an object that has an indirect reference to the Settings object. Adjust your code so that is not necessary. in Drupal\Core\Site\Settings->__sleep() (line 68 of core/lib/Drupal/Core/Site/Settings.php). serialize(Array) (Line: 14)↵Drupal\Component\Serialization\PhpSerialize::encode(Array) (Line: 80)↵Drupal\Core\KeyValueStore\DatabaseStorageExpirable->setWithExpire('form-N54MTRLssndXf26RMLAQGrjGs2yHnPM0R-ZfF0Xq7SU', Array, 21600) (Line: 197)↵Drupal\Core\Form\FormCache->setCache('form-N54MTRLssndXf26RMLAQGrjGs2yHnPM0R-ZfF0Xq7SU', Array, Object) (Line: 459)↵Drupal\Core\Form\FormBuilder->setCache('form-N54MTRLssndXf26RMLAQGrjGs2yHnPM0R-ZfF0Xq7SU', Array, Object) (Line: 437)↵Drupal\Core\Form\FormBuilder->rebuildForm('commerce_checkout_flow_edit_form', Object, Array) (Line: 629)↵Drupal\Core\Form\FormBuilder->processForm('commerce_checkout_flow_edit_form', Array, Object) (Line: 321)↵Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)↵Drupal\Core\Controller\FormController->getContentResult(Object, 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: 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)↵"
name: "AjaxError"
__proto__: Error at /assets/files/js/js_TdiMRR3BXgOgIRoGh26DZjaqiPeXu2B4dXeyhxcJsws.js:1697:32 at /assets/files/js/js_TdiMRR3BXgOgIRoGh26DZjaqiPeXu2B4dXeyhxcJsws.js:2240:3
Steps to reproduce
Install Drupal commence 2.20 on a fresh install of Drupal core and then edit or create a new commerce checkout flow.
I do have commerce installations on the same server, which do not suffer from the same issue. I tried to upgrade to Dev version or downgrade to 2.19, however, the error is persistent.
Comments
Comment #2
authintmedia commentedComment #3
AmeDSL commentedSame problem here...
Comment #4
mglamanWhat contrib do you have installed that are used in the checkout form?
Comment #5
kristofferromSame problem here.
Contrib Commerce modules installed:
Comment #6
kristofferromSome searching around led me to this mail_login issue: https://www.drupal.org/project/mail_login/issues/3161437
Disabling mail_login made the issue go away for me,
Comment #7
rszrama commented