When I place an order and try to change my payment method, I have this error :

Type php
Date Monday, 21 January, 2019 - 09:44
User administrateur
Location https://www.domaine.com/fr/checkout/45/order_information?_wrapper_format...
Referrer https://www.domaine.com/fr/checkout/45/order_information
Message LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep() (line 1481 of /var/www/www-s1biose-com/web/core/lib/Drupal/Core/Database/Connection.php).
Severity Error

When I uninstall the "Webform Submission Log" sub-module it works.

Comments

zenimagine created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have any other modules enabled besides webform and commerce that could call the webform_submission log? Commerce Webform Order?

We need to figure out what is logging things to the webform_submissino log channel. Only logs targetting the webform_submission channels are serialized. When you disable the webform_submission_log.module, what are the 'webform_submission' type messages listed under /admin/reports/dblog.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
mindaugasd’s picture

Version: 8.x-5.0-rc31 » 8.x-5.1
Status: Closed (cannot reproduce) » Active

Had the same problem, disabling "Webform Submission Log" solved the issue.

My case just a little bit different, since I was not able to add new payment through admin UI "/admin/commerce/orders/7/payments/add".
I do not have "Commerce Webform Order" module.
There are no "webform_submission" messages listed, since website is in development.
Tried to re-enable the module to make sure, it stopped working, so uninstalled again.

I list what webform related modules are enabled: Webform, Webform Access, Webform Bootstrap, Webform Devel, Webform Node, Webform Submission Log, Webform Templates, Webform UI.

jrockowitz’s picture

Can you please attach an example webform that can be used to replicate this issue?

mindaugasd’s picture

StatusFileSize
new7.19 KB

Attached form. Its very simple one.

jrockowitz’s picture

I don't understand how to replicate this issue using the webform from #6. It is just a simple contact form.

What are the steps required to replicate this issue?

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)
mindaugasd’s picture

No idea.

facine’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new872 bytes

Hi, I've been there in a custom webform handler.

I think we need to implement this trait in WebformSubmissionLogManager.php file:

  use DependencySerializationTrait;
mindaugasd’s picture

In 8.x-5.1 version this code is not being used in the first place. I copied this file from the dev version to my website and issue disappeared.

And your patch this line
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
seems to be written two times now, so this patch is not needed seems to be.

mindaugasd’s picture

Version: 8.x-5.1 » 8.x-5.x-dev
Status: Needs review » Closed (cannot reproduce)
pcambra’s picture

Status: Closed (cannot reproduce) » Fixed

This should be fixed rather than closed as per https://git.drupalcode.org/project/webform/commit/ce51252

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.