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

  1. Install Drupal 10.4.
  2. Add core Image plugin to text format, IMCE-specific plugin not necessary.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork imce-3497688

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

collinhaines created an issue. See original summary.

awasson’s picture

I 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

justcaldwell made their first commit to this issue’s fork.

justcaldwell’s picture

Status: Active » Needs review

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

justcaldwell’s picture

StatusFileSize
new952 bytes

Attaching a static patch.

justcaldwell’s picture

Marked MR as ready. Given that the previous code remains, this should still work with previous versions.

noahterp’s picture

From 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's false before injecting the button, and set it to true when it's added.

justcaldwell’s picture

StatusFileSize
new954 bytes
new954 bytes

My mistake -- I should've used .once() instead of .on(). MR updated.

Thanks for testing!

ufku’s picture

Version: 3.1.1 » 3.x-dev
Status: Needs review » Fixed

Merged into 3.x

Thanks!

Status: Fixed » Closed (fixed)

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

stevenpatz’s picture

Drupal 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

awasson’s picture

StatusFileSize
new152.31 KB

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

screenshot of image upload checkbox disabled

stevenpatz’s picture

Yeah that setting matches what I have as well.

stevenpatz’s picture

Update: When I use Chrome, the icon does not show up. But using Firefox it does.

awasson’s picture

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

stevenpatz’s picture

Yeah I think it's a local issue, as I had our QA go thru and they saw it on Chrome and Firefox

ufku’s picture