Avoid creating incomplete editor.editor.* configs if they don't exist

Created on 25 April 2025, about 19 hours ago

Problem/Motivation

After upgrading this module to latest version, we are facing below error:-

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. 
Valid plugin IDs for Drupal\editor\Plugin\EditorManager are: ckeditor5

After debugging, it is found that this occurs when the following update hook in acquia_cms_common runs:

function acquia_cms_common_update_9332()

The helper function _acquia_cms_common_update_page_configurations() unconditionally calls ConfigFactory::getEditable() on editor configs (editor.editor.filtered_html, editor.editor.full_html), and updates them โ€” even when these configurations donโ€™t exist yet. This leads to:

  • Creation of incomplete editor.editor.* configs (missing required fields).
  • CKEditor crashing when trying to load these formats.

Steps to reproduce

  • Install a Drupal site with no pre-defined filtered_html or full_html editor formats.
  • Install acquia_cms_common.
  • Run the acquia_cms_common_update_9332 update hook (e.g., via drush updb).
  • Attempt to load a node edit form using CKEditor 5.

Proposed resolution

Prevent the update hook from creating config stubs if the config does not already exist.

๐Ÿ› Bug report
Status

Active

Version

3.3

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia rahulrasgon

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

Comments & Activities

Production build 0.71.5 2024