Problem/Motivation

After updating to latest Drupal core (11.3.4) CKEditor has stopped working.

Steps to reproduce

1. Do a clean Drupal installation with Drupal core 11.3.4

drush si standard

2. Verify that CKEditor works as expected in any WYSIWYG field (e.g. /node/add/page)
3. Install and enable latest version of the module

composer require 'drupal/editor_advanced_image:^3.1'
drush en editor_advanced_image -y

2. Check any WYSIWYG field once more -> CKEditor is no longer loading. Browser console should be reporting error

CKEditorError: plugincollection-plugin-invalid-constructor {"name":"e"}

CommentFileSizeAuthor
#19 CleanShot 2026-03-13 at 11.55.40.mp46.47 MBwengerk
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

arturs.v created an issue. See original summary.

rhayun’s picture

The key change is removing EditorAdvancedImageCommand from the requires array of the EditorAdvancedImage plugin in index.js

teebo’s picture

I am also having the same issue on a Drupal 10.6.5 site.
Like suggested by Ronen, removing EditorAdvancedImageCommand from the EditorAdvancedImage plugin index.js does not work in my case.
Would you have any other suggestions?
Thank you.

riaan burger’s picture

Also edit the built and shipped editor_advanced_image/js/build/editorAdvancedImage.js - it is minified, so around the end you will find `static get requires(){return[o,c,e]`, just change that to `static get requires(){return[o,c]`.

wengerk’s picture

I'll take a look on friday, in the meantime if someone willig to contribute I would review with pleasure.

riaan burger’s picture

I reproduced this on editor_advanced_image 3.1.2 with Drupal 10.6.5.

CKEditor fails with: CKEditorError: plugincollection-plugin-invalid-constructor

The cause appears to be that EditorAdvancedImageCommand is included in EditorAdvancedImage.requires(), even though it is a command rather than a plugin.

I opened a merge request that removes it from requires().

I also verified locally that rebuilding updates js/build/editorAdvancedImage.js accordingly, but I did not include the built artifact in the MR.

arturs.v’s picture

Status: Active » Needs review

Looks like we managed to open some MRs at the same time. The more the merrier.

My MR essentially accomplishes the same, but includes the built artifact and updates CKEditor related dependencies in the package.json.

lisotton’s picture

Status: Needs review » Reviewed & tested by the community

I tested with MR !27 and it worked fine.

Moving to RTBC.

thomas kaisuka’s picture

None of them worked for me on 11.3.5

riaan burger’s picture

Status: Reviewed & tested by the community » Active

This module ships a built CKEditor bundle in js/build/editorAdvancedImage.js, and Drupal loads that file at runtime. Composer does not rebuild the module's JS during install/update.

So if you tested only a source-level change in js/ckeditor5_plugins/.../src/index.js, that may not affect the site unless the built file was also regenerated or patched.

Could you check whether your installed js/build/editorAdvancedImage.js still contains the bad requires() entry? As a local verification step, you could also try rebuilding the module bundle with:

npm install
npm run build

and then retest.

A future fixed release of this module should include the regenerated js/build/editorAdvancedImage.js.

If you already tested with a patched built file and it still fails on Drupal 11, then there may be a second compatibility problem beyond the invalid constructor.

riaan burger’s picture

You can check with:

grep -n 'static get requires' js/build/editorAdvancedImage.js
grep -n 'return\[o,c,e\]\|return\\[o,c,e\\]' js/build/editorAdvancedImage.js

  • wengerk committed b9b1f7d7 on 3.1.x
    fix: #3577482 Advanced image plugin breaks CKEditor after Drupal core 11...
wengerk’s picture

Status: Active » Reviewed & tested by the community

Fixed and merged into 3.1.x.

Thank you all for your dedicated time reviewing and fixing this issue — credits and attribution go to each and every one of you. 🙏

For those who wish to use a pre-release patch, I would suggest picking any from MR !27, MR !28, or MR !29.

giordy’s picture

On Drupal 11.3.5, upgrading to 3.1.3 does not work.

CKEditorError: plugincollection-plugin-invalid-constructor {"name":"e"}
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-plugincollection-plugin-invalid-constructor
    O https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    h https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    h https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    h https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    r https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    e https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    init https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    initPlugins https://www.gmpe.it/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=47.6.0:5
    create https://www.gmpe.it/core/assets/vendor/ckeditor5/editor-classic/editor-classic.js?v=47.6.0:4
    create https://www.gmpe.it/core/assets/vendor/ckeditor5/editor-classic/editor-classic.js?v=47.6.0:4
    attach https://www.gmpe.it/core/modules/ckeditor5/js/ckeditor5.js?tbu2qy:372
    editorAttach https://www.gmpe.it/core/modules/editor/js/editor.js?v=11.3.5:304
    attach https://www.gmpe.it/core/modules/editor/js/editor.js?v=11.3.5:228
    attach https://www.gmpe.it/core/modules/editor/js/editor.js?v=11.3.5:211
    attachBehaviors https://www.gmpe.it/core/misc/drupal.js?v=11.3.5:166
    attachBehaviors https://www.gmpe.it/core/misc/drupal.js?v=11.3.5:162
    <anonymous> https://www.gmpe.it/core/misc/drupal.init.js?v=11.3.5:32
    listener https://www.gmpe.it/core/misc/drupal.init.js?v=11.3.5:20
ckeditor5.js:466:19
    attach https://www.gmpe.it/core/modules/ckeditor5/js/ckeditor5.js?tbu2qy:466
wengerk’s picture

StatusFileSize
new6.47 MB

I just tested this on both the 3.1.2 and 3.1.3 tags and recorded a video showing that the bug is present in 3.1.2 and properly resolved in 3.1.3.

https://www.drupal.org/files/issues/2026-03-13/CleanShot%202026-03-13%20at%2011.55.40.mp4

That said, I want to make sure we're not missing anything on your side. Could it be that another module is interfering and causing the issue to persist for you? It might be worth testing with only Editor Advanced Image enabled to help narrow it down.

musa.thomas’s picture

Same as @giordy comment drupal 11.3.5, got 3.1.3 and still got the same error, if the module is disable everything is ok

wengerk’s picture

Could you share steps to reproduce the issue from a clean Drupal install? That would really help us pinpoint what's going wrong on your end.

Also, one thing worth checking: is it possible your browser is serving a cached version of the Editor Advanced Image JavaScript from 3.1.2? A hard refresh (Ctrl+Shift+R / Cmd+Shift+R) or clearing your browser cache before testing on 3.1.3 could make a difference ?

musa.thomas’s picture

@wengerk ok my bad it was the browser cache, I didnt try cause I disable and enable with drush cr but it was stupid to not refresh browser cache sorry. Everything seems ok.

wengerk’s picture

Status: Reviewed & tested by the community » Fixed

Glad it was as trivial as a browser cache issue! No worries at all, it happens. Happy it's all working now! 😄

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

srdtwc’s picture

I seem to be having issues with 3.1.3 on 10.6.5 but only on my production environment. Upgrading from 3.1.2 fixed the issue on my dev and staging environments. Clearing caches, purging CF cache, etc seems to do nothing to fix it. The only workaround for the time being is to uninstall this module.

I've tried multiple browsers to try to isolate the issue but no luck yet.

giordy’s picture

It was actually the browser cache.
Sorry and thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.