CKEditor 5 not working on custom block creation/editing if both Admin Toolbar Search and JS aggregation are activated

Created on 17 February 2023, over 1 year ago
Updated 3 August 2023, 11 months ago

Problem/Motivation

If the Admin Toolbar Search submodule is activated CKEditor 5 is not loaded on custom block creation/editing if JS aggregation is active

Steps to reproduce

  • Activate Admin Toolbar Search
  • Be sure JS aggregation is turned on in config>development>performance
  • Try to create a custom block via structure>block layout>add custom block

Also the dropdowns are not working anymore.

Everything works fine if

  • JS aggregation is turned off or
  • Admin Toolbar Search is turned off

Everything works also on node creation forms (with JS aggregation and Admin Toolbar Search turned on)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.3

Component

Code

Created by

🇦🇹Austria steponeloops

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

Comments & Activities

  • Issue created by @steponeloops
  • 🇫🇷France hassebasse

    I was just about to report a similar issue. With Admin Toolbar Search active it is impossible to change Text Edidor settings in Blocks. All is fine in Content type.

    D10, PHP8.1, CKEditor 5

  • Hi, I have similar issue. But in my case it is only caused by JS aggregation. I have admin toolbar search permanently uninstalled. If I turn on JS aggregation CKEditor 5 not working at custom block edit page.

  • 🇫🇮Finland kekkis Pirkkala

    Adding a comment regarding taxonomy_term forms, where JS breaks if the description field is enabled (and has ckeditor-enabled text formats available to it). For me it did not matter whether aggregation was on. But uninstalling admin_toolbar_search makes the errors disappear.

  • Can reproduce this issue. Tried admin_toolbar 3.3.0 and also 3.2.1, both have the same issue. When javascript aggegation is enabled, ckeditor will not be loaded on /block/add. Also dropdown menu's in toolbar are not working.

    Adding /block/add/* @ /admin/config/development/performance to prevent minification on those pages does not solve this issue.

    Errors in console:

    Uncaught TypeError: t.widget is not a function
    Uncaught TypeError: Cannot set properties of undefined (setting 'ckeditor5')
    Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
    Uncaught TypeError: Drupal.toolbar.ToolbarModel is not a constructor
  • 🇫🇮Finland Nchase

    Same problem. As soon as js aggregation is turned off the editor appears in the block edit form. If aggregation is on = no editor.

Production build 0.69.0 2024