Unable to load with JS aggregation enabled

Created on 16 December 2024, 3 months ago

Problem/Motivation

With Drupal JS aggregation enabled, the plug-in doesn't load.
We are using find-and-replace, not sure if this is the same for other plugins

It seems maybe related to load ordering.
The find-and-replace JS script from CDN is loaded before the CKEditor 5 panel.

With JS aggregation disabled, the find-and-replace JS script will be loaded separately after the CK5 aggregated JS. Then the plugin is working.

Steps to reproduce

Navigate to Admin, Performance
Enable JS aggregation
Enable find-and-replace in one of the Text Format
Create an article using one of the Text Format, the CK5 panel cannot be loaded. No JS error in console.

Proposed resolution

For remote script, setting the weight seems not working because it cannot set a positive number via hook_library_info_build.
For local script, setting the dependency 'core/ckeditor5.basic' to make it work.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇨🇦Canada francismak

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

Comments & Activities

  • Issue created by @francismak
  • Hi francismak

    Thank you for reporting the issue - we'll try to address it in one of upcoming releases.

  • 🇵🇱Poland salmonek

    Hi francismak

    Unfortunately I wasn't able to reproduce the issue so far.
    Do you have core aggregation only or with some extension module (AdvAgg)?
    Can you share list of toolbar plugins enabled in your text format

  • 🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

    I think I got the same issue. But I got the issue in Layout builder when adding a new basic block. The patch doesn't seem to fix it for me.

  • 🇵🇱Poland salmonek

    Hi phjou

    Is your case also without any errors in JS console?
    Does it stop occuring without aggregaton?

    The patch will be for sure applied to the 1.3.x branch as code setting dependency on 'ckeditor5/ckeditor5 has been copied form Premium Features module and it is an oversight that we didn't update it after CKEditor 5 was moved to core and now it doesn't make sense.

Production build 0.71.5 2024