Ensure the 'collection' column in the wse_config_field_revision table

Created on 29 September 2023, over 1 year ago
Updated 3 October 2023, over 1 year ago

Problem/Motivation

The collection base field on the wse_config entity type was marked as revisionable at some point via a change in the entity class' base field definitions. If a site already had the module installed before this change, it seems that an update hook is necessary in order to make the collection base field revisionable in this scenario.

Without the update hook, there will be exceptions as the following which can lead to a broken site because config is no longer read.

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'wse_config_field_revision.collection' in 'where clause'

Steps to reproduce

On Vanilla Drupal with Ckeditor5 enabled

  • Add a workspace and a content in the live workspace
  • In the wse module, checkout the commit before 54cf38aac0c6a146e330ede440a4a8f14cef2feb
  • Check if you can edit the content's body field with Ckeditor5
  • Update wse to 1.0.x and run updates, clear caches
  • Check again if you can edit the content's body field. The ckeditor should be broken now

Proposed resolution

Update the base field's storage definition ensure the collection column is added to the revision table too. Also in case of exceptions in the database config storage of wse_config, make sure the core config is returned and exceptions are logged.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Workspace Config

Created by

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

Comments & Activities

Production build 0.71.5 2024