Settings Config Does Not Capture Dependency on CKEditor

Created on 11 July 2024, 7 months ago

Problem/Motivation

When the Patternkit settings are configured to use CKEditor, the saved configuration file doesn't indicate CKEditor as a dependency which then allows the CKEditor module to be disabled and leads to breaking errors.

Steps to reproduce

  1. Enable the following modules: patternkit, patternkit_example, layout_builder, ckeditor
  2. Enable layout builder display with per-node customizations on the basic page content type
  3. Edit patternkit settings to use CKEditor and the Full HTML toolbar
  4. Create a new basic page Node
  5. Edit the page layout and add a [Patternkit] Example block with content in the formatted text field
  6. Save the layout and observe correct rendering of the content
  7. Uninstall the ckeditor module
  8. Observe no prompt to uninstall the Patternkit module or change configuration is displayed
  9. Edit the page layout and example block
  10. Observe page error

Unable to load class for editor CKEditor5. Expected to find Drupal\ckeditor5\Plugin\Editor\CKEditor5.

Proposed resolution

When the Patternkit settings form is saved, add the selected editor and toolbar format as a dependency to prevent uninstallation of the module without fixing the settings appropriately.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

Patternkit settings field now includes dependency on the ckeditor module if configured to use it.

πŸ› Bug report
Status

Closed: won't fix

Version

9.1

Component

Module Core

Created by

πŸ‡ΊπŸ‡ΈUnited States slucero Arkansas

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

Comments & Activities

  • Issue created by @slucero
  • πŸ‡ΊπŸ‡ΈUnited States slucero Arkansas
  • πŸ‡ΊπŸ‡ΈUnited States slucero Arkansas

    slucero β†’ changed the visibility of the branch 3460835-settings-config-dependency to hidden.

  • Status changed to Closed: won't fix 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States slucero Arkansas

    After briefly investigating this, I determined the outcome is not worth the effort since the scenario of users uninstalling ckeditor altogether with content already in the system is less likely. In the event a user does encounter this scenario, they may update the Patternkit settings and remove the ckeditor selection to resolve this error.

    Since Patternkit is using the Simple Configuration API β†’ to track these settings, dependencies are not tracked and supported. This behavior would require migrating the settings to use config entities which would be a much more substantial lift.

Production build 0.71.5 2024