TypeError: o.Model is not a constructor (Drupal 10.3 compatibility)

Created on 20 August 2024, 4 months ago
Updated 2 September 2024, 3 months ago

Problem/Motivation

Drupal core: 10.3.2
Inline Responsive Images: 3.0.0-beta1 (also present on dev)
CKEditor 5

When managing images in the editor, the image settings popup is not displayed when clicked. The following text is placed next to the image: 'Please select an image style'.

When clicking on the image, the following error is displayed in the console:

Uncaught TypeError: o.Model is not a constructor
    at Object.callback (images.js?sihsba:1:5256)
    at Vo.create (ckeditor5-dll.js?v=41.3.1:5:567323)
    at ckeditor5-dll.js?v=41.3.1:5:531205
    at Array.map (<anonymous>)
    at dt._buildItemsFromConfig (ckeditor5-dll.js?v=41.3.1:5:531113)
    at dt.fillFromConfig (ckeditor5-dll.js?v=41.3.1:5:530971)
    at q._showToolbar (ckeditor5-dll.js?v=41.3.1:5:718748)
    at q._updateToolbarsVisibility (ckeditor5-dll.js?v=41.3.1:5:718499)
    at r.<anonymous> (ckeditor5-dll.js?v=41.3.1:5:717231)
    at r.fire (ckeditor5-dll.js?v=41.3.1:5:663135)

Steps to reproduce

Install the modules as above (versions appear to be important) and verify that the images are no longer configurable

Proposed resolution

It looks like a number of CKEditor 5 plugin modules have been affected. The code probably needs to be updated similar to those e.g.:

https://www.drupal.org/project/ckeditor5_template/issues/3456952 🐛 Updating core to 10.3 breaks CKEditor Fixed
https://www.drupal.org/project/ckeditor_responsive_plugin/issues/3460031 🐛 Drupal 10.3 Compatibility Active
https://www.drupal.org/project/ckeditor_iframe/issues/3462027 🐛 TypeError: t.Model is not a constructor (Drupal 10.3 compatability) Needs work

Remaining tasks

Replace CKEditor Model with ViewModel?

User interface changes

Not likely

API changes

Not likely

Data model changes

Not likely

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇦🇺Australia marc.groth

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024