Getting LogicException: The database connection is not serializable.

Created on 23 August 2023, 10 months ago
Updated 9 September 2023, 10 months ago

Problem/Motivation

Getting this error when trying to delete a user and assign it's content to another one:
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 2042 of core/lib/Drupal/Core/Database/Connection.php).

Proposed resolution

Add the DependencySerializationTrait to src/MediaBatchService.php

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania ciprian.stavovei

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

Comments & Activities

Production build 0.69.0 2024