Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When trying to save a panelized entity instance, I get the following error:
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.
Any idea how to resolve this, or what causes it?
Comments
Comment #2
japerryI haven't stumbled upon this issue, can you provide steps to reproduce?
Comment #3
oinuma CreditAttribution: oinuma commentedI also suffered from the same error.
This error appears when installing the Supercache module.
When setting panels, Supercache module is uninstalled.
It is an error code in that case.
Comment #4
DamienMcKenna@basvanderheijden: Are you using the Supercache module too?
Comment #5
david_garcia CreditAttribution: david_garcia commentedI've seen sparse reports if this issue, and seems to be related to the Supercache module.
The problem is that the issue happens at some point in the execution pipeine in which the stack trace at the moment of the issue is not helpful to diagnose the issue.
Comment #6
AnybodyPerhaps related to #2893029: EntityType objects cannot be reliably serialized without DependencySerializationTrait ?
Comment #7
phillamb168 CreditAttribution: phillamb168 as a volunteer commented@Anybody: I applied the patch from 2893029, but it didn't help.
FWIW I'm not sure this has to do with Supercache, but rather Wincache. If I disable Wincache, I no longer see the error.
Steps to reproduce:
IIS/SQLServer/D8.4.3; install Supercache + Wincache. Next, try to install any module. You should see the error immediately.
Disable wincache, the error goes away.
CC @david_garcia
Comment #8
Anybody@phillamb168 Yes OK, somehow I think the reason is related... there are related issues in other modules having similar problems. I also have no clue yet how to fix it cleanly.