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.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | webform-implement_dependency_serialization_trait-3027248-10.patch | 872 bytes | facine |
| #6 | example-form.yml | 7.19 KB | mindaugasd |
| Capture d’écran du 2019-01-21 10-04-53.png | 87.21 KB | zenimagine |
Comments
Comment #2
jrockowitz commentedDo 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.
Comment #3
jrockowitz commentedComment #4
mindaugasd commentedHad 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.
Comment #5
jrockowitz commentedCan you please attach an example webform that can be used to replicate this issue?
Comment #6
mindaugasd commentedAttached form. Its very simple one.
Comment #7
jrockowitz commentedI 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?
Comment #8
jrockowitz commentedComment #9
mindaugasd commentedNo idea.
Comment #10
facine commentedHi, I've been there in a custom webform handler.
I think we need to implement this trait in WebformSubmissionLogManager.php file:
Comment #11
mindaugasd commentedIn 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.
Comment #12
mindaugasd commentedComment #13
pcambraThis should be fixed rather than closed as per https://git.drupalcode.org/project/webform/commit/ce51252