[6.1.x] Error in moving buttons from the Available buttons to the Active toolbar

Created on 26 February 2025, 2 months ago

Problem/Motivation

I was trying to change the Toolbar configuration for the "Full HTML" text format and I added a few buttons:

When I click on "Save Configuration" I got into this error:

The website encountered an unexpected error. Try again later.

AssertionError: assert($shifted === 'settings') in assert() (line 847 of core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php).
Drupal\ckeditor5\Plugin\Editor\CKEditor5::mapViolationPropertyPathsToFormNames() (Line: 893)
Drupal\ckeditor5\Plugin\Editor\CKEditor5::mapPairViolationPropertyPathsToFormNames() (Line: 678)
Drupal\ckeditor5\Plugin\Editor\CKEditor5->validateConfigurationForm() (Line: 59)
editor_form_filter_admin_format_validate()
call_user_func_array() (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers() (Line: 274)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 585)
Drupal\Core\Form\FormBuilder->processForm() (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult() (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Follow the steps above

Proposed resolution

I'm not sure what is happening here, I'll look into the Drupal Core issues and see if I can get some hints.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.1

Component

Code

Created by

🇨🇦Canada web247 Toronto

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

Comments & Activities

  • Issue created by @web247
  • 🇨🇦Canada smulvih2 Canada 🍁

    @web247 I just tested this on a fresh install of 6.1.x, adding the same buttons (fontawesome, footnotes) to the full_html text format. I did get a JS validation issue, dealing with image_upload.status. This was coming from editor.editor.full_html.yml:

    image_upload:
      status: false
      scheme: public
      directory: inline-images
      max_size: ''
      max_dimensions:
        width: 0
        height: 0
    

    Since the status is set to False, we don't actually need theother lines. By changing to this to the following I was then able to add the icons and save without error:

    image_upload: { }

    I also tested rich_text and was getting some JS validation issues as well, due to latest plugins. I had to remove <cite> and <div class> from filter.format.rich_text.yml since plugins already specify these elements. After these two changes to the text formats I was able to save without any issues.

    Not sure about your reported issue, that looks more like a PHP error than JS validation of the text format settings form. I was not able to reproduce this on a fresh install.

    Closing this as can't reproduce. Please try pulling the latest changes and test again from a fresh install. If you experience this isue again feel free to re-open this issue.

Production build 0.71.5 2024