JS error "plugincollection-plugin-not-found"

Created on 29 October 2024, 23 days ago

Using v1.0.1 on Drupal 10.3.5
As soon as I enable the module, trying to display a CKEditor field in the admin produces the following error, even if I don't enable the filter in any of the text format :

CKEditorError: plugincollection-plugin-not-found {"plugin":null}
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-plugincollection-plugin-not-found
    at ckeditor5-dll.js?v=41.3.1:5:125486
    at ckeditor5-dll.js?v=41.3.1:5:125545
    at Array.forEach (<anonymous>)
    at u (ckeditor5-dll.js?v=41.3.1:5:125347)
    at l.init (ckeditor5-dll.js?v=41.3.1:5:123835)
    at V.initPlugins (ckeditor5-dll.js?v=41.3.1:5:133962)
    at js_CLrtYCfqY9rZ5F9Ix…8-I_TDwFqg:22:10883
    at new Promise (<anonymous>)
    at V.create (js_CLrtYCfqY9rZ5F9Ix…8-I_TDwFqg:22:10840)
    at Object.attach (js_CLrtYCfqY9rZ5F9Ix…28-I_TDwFqg:40:3962)
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @clemorphy
  • 🇨🇦Canada star-szr

    Hi, thanks for the report.

    After clearing caches do you see the same result?

    What method are you using to install the module?

    Can you be more specific about "trying to display a CKEditor field in the admin", is that something like editing a node with a body field, or is there custom code involved?

    If you could write up steps to reproduce this from a clean install of Drupal that would be really helpful, since I'm not able to reproduce it in my testing. I tested with the same module and core versions (v1.0.1 on Drupal 10.3.5) but did not see any errorr, before or after clearing caches.

  • After clearing caches do you see the same result?

    Yes, first thing I tried was clearing caches. Same result.

    What method are you using to install the module?

    composer require 'drupal/ckeditor5_paste_filter:^1.0'
    drush en ckeditor5_paste_filter
    Can you be more specific about "trying to display a CKEditor field in the admin", is that something like editing a node with a body field, or is there custom code involved?

    I'm trying to edit a paragraph on a node.

    If you could write up steps to reproduce this from a clean install of Drupal that would be really helpful, since I'm not able to reproduce it in my testing. I tested with the same module and core versions (v1.0.1 on Drupal 10.3.5) but did not see any errorr, before or after clearing caches.

    I tried a "SimplyTest" and of course it worked. I'm gonna try to disable other filters and/or contrib modules on my local installation, to see what could interfer.

    Thank you.

  • 🇨🇦Canada star-szr

    Thank you for mentioning paragraphs module, that might be an important piece. If you can provide more information about the structure of your content type that might point to a way to reproduce the bug.

    Could you also try disabling JS aggregation and re-testing on your actual site (I'm assuming JS aggregation is enabled)? You may need to clear caches after.

  • Ah funny that your are pointing JS aggregation, I was on that track too.
    Actually I tested another contrib module that might better suit my needs ( CKEditor5 Custom Paste ) and it did exactly the same thing, as soon as I enable it, it crashes my CKEditor instances.
    And at some point I tested with JS aggregation disabled, and it worked. I haven't tested again yet with CKEditor5 Paste Filter, but I think it will work too. But I don't really want to disable JS aggregation, so I searched more about it, and I found this 🐛 CKEditorError: plugincollection-plugin-not-found Needs work , which was fixed yesterday.
    I tried on CKEditor5 Custom Paste to do the same. I replaced in the .libraries.yml :
    js/build/pasteFilter.js: { preprocess: false, minified: true }
    with
    js/build/pasteFilter.js: { preprocess: true, minified: true }

    And then enabled JS aggregation again. And it worked. Again, not tested yet on CKEditor5 Paste Filter, but I think it will fix it too.

  • 🇨🇦Canada star-szr

    Thanks for the update! I definitely don't want to suggest you disable JS aggregation, just trying to diagnose this bug.

    That library change might make sense, I think it's something I pulled from the ckeditor5_dev plugin starter template but maybe it's not a good idea. I did find https://www.drupal.org/project/ckeditor5_dev/issues/3401747 🐛 "plugin-not-found" when using the plugin starter template Closed: cannot reproduce which may be potentially related - same error message.

  • 🇨🇦Canada star-szr

    I read through https://www.drupal.org/project/ckeditor_media_resize/issues/3471500#comm... 🐛 CKEditorError: plugincollection-plugin-not-found Needs work and that makes sense, I would still love a way to reproduce this though, so I can add automated testing around it. I'm still not clear on exactly when and how this bug would happen.

  • I think it depends on the number of JS that need to be aggregated. So maybe also on the number of contrib modules that add a JS lib.

  • 🇨🇦Canada star-szr

    Thanks, nice idea. I'll see if I can cook up a test scenario that shows this bug.

Production build 0.71.5 2024