LogicException: The database connection is not serializable

Created on 19 August 2025, about 1 month ago

Problem/Motivation

The following error is triggered when adding a filter to a view:

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 1309 of /[..]/web/core/lib/Drupal/Core/Database/Connection.php).

Proposed resolution

Add DependencySerializationTrait to Drupal\symfony_translation\SymfonyTranslation.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024