IMCE Input Missing from CKEditor 44, Core Image Plugin

Created on 6 January 2025, 2 months ago

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

πŸ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States collinhaines

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

Merge Requests

Comments & Activities

  • Issue created by @collinhaines
  • πŸ‡¨πŸ‡¦Canada awasson

    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

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    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.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 178s
    #407706
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    Attaching a static patch.

  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

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

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

    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.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 179s
    #409328
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

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

    Thanks for testing!

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

  • Status changed to Fixed 6 days ago
  • πŸ‡ΊπŸ‡ΈUnited States stevenpatz Alexandria VA

    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

  • πŸ‡¨πŸ‡¦Canada awasson

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

  • πŸ‡ΊπŸ‡ΈUnited States stevenpatz Alexandria VA

    Yeah that setting matches what I have as well.

  • πŸ‡ΊπŸ‡ΈUnited States stevenpatz Alexandria VA

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

  • πŸ‡¨πŸ‡¦Canada awasson

    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.

  • πŸ‡ΊπŸ‡ΈUnited States stevenpatz Alexandria VA

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

Production build 0.71.5 2024