- Issue created by @Akhil Babu
- First commit to issue fork.
- Merge request !13Issue #3483119: LogicException: The database connection is not serializable → (Open) created by spotzero
- 🇨🇦Canada spotzero
I've opened a MR with the fix. The issue was that the form alter implemented in FieldConfigFormAlter add itself as a callback for the submit call.
However, since FieldConfigFormAlter contains a reference to EntityTypeManager, when Drupal attempts to add the form to the form cache, it dies trying to serialize itself.
The submit callback doesn't actually need an instance of the call however, so I've made the submit method static, and made the callback call it statically to avoid the issue altogether.