Switching between editors on the format configuration causes errors upon save

Created on 6 April 2016, over 8 years ago
Updated 10 April 2024, 8 months ago

Problem/Motivation

On a fresh installation when someone accidentally switches the text editor from CKEditor to None and then back to CKEditor an unexpected error occurs.

Drupal\Core\Entity\EntityStorageException: 'editor' entity with ID 'basic_html' already exists. in Drupal\Core\Entity\EntityStorageBase->doPreSave() (line 430 of /home/r0kr9/www/core/lib/Drupal/Core/Entity/EntityStorageBase.php).

Steps to reproduce:

  1. Install Drupal
  2. Head to admin/config/content/formats/manage/basic_html
  3. Switch Text Editor to None
  4. Switch Text Editor back to CKEditor
  5. Save configuration

Proposed resolution

Fix it

Remaining tasks

Do it

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

8.8 ⚰️

Component
EditorΒ  β†’

Last updated about 24 hours ago

Created by

πŸ‡¬πŸ‡·Greece thpoul

Live updates comments and jobs are added and updated live.
  • Triaged core major

    There is consensus among core maintainers that this is a major issue. Only core committers should add this tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States patrickfgoddard

    Still encountering this in d10.2.5. Same scenario as originally posted above: Editing basic_html (admin/config/content/formats/manage/basic_html), toggle "Text Editor" from ckeditor5 to none then back again. Hit submit and same error:

    Drupal\Core\Entity\EntityStorageException: 'editor' entity with ID 'basic_html' already exists. in Drupal\Core\Entity\EntityStorageBase->doPreSave() (line 519 of /app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php).

Production build 0.71.5 2024