Drupal 10.3.3, Insert 3.0.0, Image Widget Crop 8.x-2.4, ckeditor 1.0.2: Insert focusses incorrectly or not at all.

Created on 6 September 2024, 2 months ago

Problem/Motivation

The latest core and Insert 3.0.0 with CKEditor4 (contrib) cannot focus properly. On one site, the image source is inserted into a body's summary field, and on another site with CK body field with no summary, Insert does nothing at all on the body field but focusses a different collapsed fieldset. Everything is configured as it was before in terms of adding image_widget_crop to Insert settings, etc.

On loading the edit form, the console shows:
Uncaught TypeError: Cannot read properties of undefined (reading 'interfaces')
at Object.attach (insert.js?v=3.x:26:34)
at drupal.js?v=10.3.3:166:24
at Array.forEach ()
at Drupal.attachBehaviors (drupal.js?v=10.3.3:162:34)
at drupal.init.js?v=10.3.3:32:12
at HTMLDocument.listener (drupal.init.js?v=10.3.3:20:7)

Steps to reproduce

Upgrade to Drupal 10.3.3, Insert 3.0.0 and latest CKEditor4 (contrib)
Configure an image field to use Image Widget Crop and add image_widget_crop to Insert settings
Set up a few Insert variants on the field's form display
Edit content of that type and clicking Insert does nothing on an uploaded image.

Proposed resolution

Attempt to fix the focus issue to find CKEditor 4 instances like it did before the updates.

🐛 Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

🇨🇦Canada darkodev

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

Comments & Activities

  • Issue created by @darkodev
  • Thanks for filing the issue. Insert 3.0.0 does not support CKEditor 4. For using CKEditor 4 with Drupal 10, you may want to try Insert 3.0.0-beta3 , which supports that combination.

    Because of the fundamentally different APIs of CKEditor 4 and 5, there is unfortunately no backwards compatibility of the Insert module.

  • Status changed to Closed: works as designed 2 months ago
  • 🇨🇦Canada darkodev

    Thanks.

    Fixing our version to 3.0.0-beta3 until we can switch from CK4 to CK5.

    Anyone else stuck on CK4 should probably do the same.

Production build 0.71.5 2024