"The database connection is not serializable" error on views configuration save

Created on 20 June 2025, 22 days ago

Problem/Motivation

After upgrade to 11.1 it occurred to be impossible to save views configuration. The error in logs is Β«The database connection is not serializableΒ». I face the same issue on all sites I've upgraded to 11.2 so this is not a problem of any custom code or server environment.

I've seen the correspondent issues for the core but they are not related to the views module and are probably not duplicates of this one.

Steps to reproduce

Upgrade core to 11.1. Try to edit and save any views display (eg field). You'll see a js error and find the described exception in the logs.

Proposed resolution

I used the suggested temporary solution and added string "use DependencySerializationTrait;" to /core/modules/views_ui/src/ViewUI.php file that fixed thew error.

Remaining tasks

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

11.2 πŸ”₯

Component

views_ui.module

Created by

πŸ‡·πŸ‡ΊRussia Alezu

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

Comments & Activities

Production build 0.71.5 2024