Ckeditor Media Resize breaks all ckeditor fields

Created on 29 May 2024, 10 months ago
Updated 17 September 2024, 7 months ago

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

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States smustgrave

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

Merge Requests

Comments & Activities

  • Issue created by @smustgrave
  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith

    I see this too on a site with several contrib ckeditor plugins.

    Disabling various combinations of plugins seems to break ckeditor when aggregation is one. Once if which is this module.

    Can't see any errors in console when aggregated or not.

    Have tried with the patch in πŸ› Drupal core 10.3 breaks compatibility with CKEditor5 API Fixed but still see the same issue.

  • Status changed to Needs review 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith

    Ok - 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: false from the libraries definition I have not been able to reproduce the error.

    I'm suspect something around the aggregation and plugin loading is flaky? Maybe not 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: false in 9.3 - in πŸ› Ckeditor Media Resize breaks all ckeditor fields Active

    Perhaps 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?

  • πŸ‡¬πŸ‡§United Kingdom jacobupal Leeds

    I 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.

  • Status changed to RTBC 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Actually believe this can be closed a duplicate of πŸ› Drupal core 10.3 breaks compatibility with CKEditor5 API Fixed . 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.

  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Thanks for working through this.

  • Status changed to Active 7 months ago
  • πŸ‡©πŸ‡ͺGermany VISIOS

    I 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.

  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith

    +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?

    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.

  • πŸ‡©πŸ‡ͺGermany VISIOS

    Yes, the module works fine with JS aggregation disabled. I tried the MR you mentioned but unfortunately the problem persists.

  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith

    Ah 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.

  • πŸ‡ΊπŸ‡ΈUnited States davedg629

    I'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.

  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith

    πŸ› CKEditorError: plugincollection-plugin-not-found Needs work 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 :)

  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith
Production build 0.71.5 2024