Problem/Motivation
The core Image CKEditor plugin has changed from a dropdown to a dialog with the upgrade to CKEditor 44.0.0 in Drupal 10.4. This modal no longer has the additional "Open file browser" button created by imceInput.processUrlInput in imce.input.js.
Steps to reproduce
- Install Drupal 10.4.
- Add core Image plugin to text format, IMCE-specific plugin not necessary.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Screenshot 2025-03-07 at 10.34.33 AM.png | 152.31 KB | awasson |
| #9 | imce-3497688-9.patch | 954 bytes | justcaldwell |
Issue fork imce-3497688
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
Comment #2
awasson commentedI can affirm that this is an issue that occurred between core versions Drupal 10.3 and Drupal 10.4.
Every one of my Drupal sites that were updated to Drupal 10.4 have lost the ability to access the IMCE file manager from the Core CKEditor image tool.
I don't see any errors in the Javascript console or the error database and the CKEditor has been set for Images not to use the upload feature in Core which should enable IMCE to work with it. Something must have been changed in core to disable IMCE integration.
Cheers,
Andrew
Comment #5
justcaldwellI opened an MR with an update that's working for us. I've only done initial testing, and I'm not in a position to easily test with ckeditor < 44.0.0 -- hence the 'draft' MR status.
Please test/review if you're able.
Comment #6
justcaldwellAttaching a static patch.
Comment #7
justcaldwellMarked MR as ready. Given that the previous code remains, this should still work with previous versions.
Comment #8
noahterp commentedFrom a quick test using the #6 patch, an additional IMCE button will be injected each time you close and reopen the "Insert image via URL" dialog. So you could end up with lots of redundant buttons when editing a page.
Best solution I can think of would be to set a flag, e.g.
let imceButtonAdded = false;in the class. Check that it'sfalsebefore injecting the button, and set it totruewhen it's added.Comment #9
justcaldwellMy mistake -- I should've used
.once()instead of.on(). MR updated.Thanks for testing!
Comment #10
ufku commentedMerged into 3.x
Thanks!
Comment #12
stevenpatzDrupal 10.4.3
IMCE 3.1.2
Cleared browser and Drupal cache. I still only see the URL entry, there's no button to open IMCE.
No IMCE Icon
Comment #13
awasson commented@stevenpatz, I have the same versions of Drupal and IMCE as you and it is working correctly on mine. Did you disable image uploads in Configuration -> Content Authoring -> Text Formats and Editors ? Under image, enable image uploads should be unchecked.
Comment #14
stevenpatzYeah that setting matches what I have as well.
Comment #15
stevenpatzUpdate: When I use Chrome, the icon does not show up. But using Firefox it does.
Comment #16
awasson commentedIt must be a caching issue. I'm using Chrome primarily but I also use FF and Edge and it appears normal. I'm on Mac OS. Perhaps there is an issue with Windows/Chrome but I haven't been made aware of it by any of my clients who are on Windows and use Chrome.
Comment #17
stevenpatzYeah I think it's a local issue, as I had our QA go thru and they saw it on Chrome and Firefox
Comment #18
ufku commented