Patternkit has an undeclared dependency on core Text Editor module and its entity type

Created on 17 September 2024, 2 months ago
Updated 18 September 2024, 2 months ago

Problem/Motivation

Patternkit has an undeclared dependency on core Editor module and its entity type

See https://git.drupalcode.org/project/patternkit/-/blob/9.1.x/src/Form/Patt...

foreach ($this->entityTypeManager->getStorage('editor')->loadMultiple() as $editor) {

Steps to reproduce

  • Install Drupal's minimal install profile
  • Enable Patternkit
  • go to /admin/config/user-interface/patternkit/json
  • observer error

Known work-around

  • Go to /admin/modules
  • Enable Text Editor module
  • go to /admin/config/user-interface/patternkit/json
  • Observe no error

Proposed resolution

* Use conditional logic similar to JsonEditorFormBuilder::supportsWysiwygEditor() here

Remaining tasks

* Add changes
* Inspect how config is saved when form element is not added to form
* Any tests

User interface changes

Yes, if Text Editor is not enabled, the form element for selecting editor will not appear

API changes

None

Data model changes

TBD - likely none, depending on solution and config storeage

🐛 Bug report
Status

Needs review

Version

9.1

Component

Module Core

Created by

🇺🇸United States jasonawant New Orleans, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024