Problem/Motivation
When updating to 10.3.0-beta1 and having aggregation turned on noticed that all ckeditor5 fields are broken, and breaking all functionality on the page like Media library and admin toolbar

Even though doesn't point out Ckeditor Media Resize specifically when I turn this filter off everything goes back to working
Steps to reproduce
Install 10.3.0-beta1
Enabled css/js aggregation
Setup a text editor using the filter
See ckeditor5 fields are broken
Proposed resolution
TBD
Remaining tasks
Fully determine cause
Determine fix
Implement
User interface changes
N/A
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | Bildschirmfoto 2024-08-29 um 11.00.09.png | 417.15 KB | visios |
| Screenshot 2024-05-29 at 11.34.59 AM.png | 417.38 KB | smustgrave |
Issue fork ckeditor_media_resize-3450674
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:
- 3450674-ckeditor-media-resize
changes, plain diff MR !11
Comments
Comment #2
smustgrave commentedActually may be a conflict with https://www.drupal.org/project/ckeditor5_embedded_content
Comment #3
ericgsmith commentedI see this too on a site on 10.3.1 with several contrib ckeditor plugins.
Disabling various combinations of plugins seems to break ckeditor when aggregation is one. One of which is this module.
Can't see any errors in console when aggregated or not.
Have tried with the patch in #3458385: Drupal core 10.3 breaks compatibility with CKEditor5 API but still see the same issue.
Comment #5
ericgsmith commentedOk - this was very difficult to reproduce outside of the site I had in question.
I was not able to reproduce it on a clean install with just ckeditor_media_resize enabled / configured with aggregation enabled.
I then started one by one trying to replicate additional things that were on the site in question - various config options and module enabled seemed to trigger this - but the one consistency was this module being enabled.
I could observe that the aggregate JS was loading and the plugin JS was loading outside the aggregate. Several modules I had in use appeared to use this pattern.
After removing
preprocess: falsefrom the libraries definition I have not been able to reproduce the error.I'm suspect something around the aggregation and plugin loading is flaky? And so this is why it was difficult to reproduce - throwing more and more plugins / JS into the mix seems to bring the error to the surface.
I assume the aggregation problem may not be specific to this module - but I'm not overly familiar with the plugin so perhaps there is something module specific at play here. Either way - I can't see any specific reason why the plugin should be excluded from the aggregate - a quick google showed that core plugins removed
preprocess: falsein 9.3 - in #3264512: Enable aggregation for CKEditor 5 assetsPerhaps somebody more familiar with the ins and outs of CKEditor plugins will know more - but that change seems to fix the issue for me.
@smustgrave - I am curious if you are still able to reproduce this issue with your setup?
Comment #6
jacobupal commentedI had a very similar situation, but it was removing the Media Embed icon from the toolbar which fixed the situation rather than the Media Resize filter (which didn't solve it) so the problem may be somewhere in the core Media module.
Comment #7
smustgrave commentedActually believe this can be closed a duplicate of #3458385: Drupal core 10.3 breaks compatibility with CKEditor5 API. Once applying the fix from over there everything works as expected. Only RTBC so it puts it in front of hte maintainers to move over credit.
Comment #8
damienmckennaThanks for working through this.
Comment #9
visios commentedI am still experiencing this error on my install with Drupal 10.3.2 and ckeditor_media_resize 1.0.0-beta2 or 1.0.x-dev.
Can anybody confirm that the error is really fixed or also still having this issue?
Comment #10
ericgsmith commented+1 that its still an issue.
I mentioned in #3 that I was testing with the patch from the now committed #3458385 in place - I don't think this is a duplicate issue.
@visios I can see you also have JS aggregation enabled - does it work for you with aggregation disabled? And if so, would you be able to test MR11 (with aggregration enabled)?
I was never able to find the root issue but for me allow the plugin JS to be aggregated made the issue go away completely.
I don't see a reason why the module should not allow the plugin JS should be not be aggregated.
Comment #11
visios commentedYes, the module works fine with JS aggregation disabled. I tried the MR you mentioned but unfortunately the problem persists.
Comment #12
ericgsmith commentedAh thanks for testing, that is a shame - I suspect I will hit this error again at some point.
Do you have any other ckeditor plugins forcing a break in aggregation?
If you are happy to share other ckeditor contrib you have in use I can compare it to my setup where I was able to reproduce the issue.
Comment #13
davedg629 commentedI'm having the same issue when aggregation is enabled.
I have two other CKEditor modules enabled: CKEditor IndentBlock and CKEditor5 Fullscreen.
I uninstalled CKEditor5 Fullscreen and the issue was resolved.
I then re-installed CKEditor5 Fullscreen and uninstalled CKEditor IndentBlock and the issue was NOT resolved.
Comment #14
ericgsmith commented#3471500: CKEditorError: plugincollection-plugin-not-found eventually did the same fix as MR11 - I had missed that this was reopened as active rather than needs review - happy the fix got in eventually :)
Comment #15
ericgsmith commented