TypeError: t.Model is not a constructor - Drupal 10.3.0

Created on 25 June 2024, 2 months ago
Updated 4 September 2024, 3 days ago

Problem/Motivation

Drupal to 10.3.0 now includes CKEditor 41.3.1 which breaks with the following error in the console: TypeError: t.Model is not a constructor.

Steps to reproduce

Install Drupal 10.3.0 and ckeditor_find 2.0.0-beta1.
Add the "Find & Replace" icon to the CKEditor toolbar.
Try to add/edit a node.

Proposed resolution

Upgrade the ckeditor5-find-and-replace package that's bundled with this module to version 41.3.1.

🐛 Bug report
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

🇨🇦Canada bwaindwain

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

Merge Requests

Comments & Activities

  • Issue created by @bwaindwain
  • Status changed to Needs review 2 months ago
  • 🇨🇦Canada bwaindwain

    Created MR with updated package

  • Status changed to RTBC 2 months ago
  • 🇮🇳India Sandeep_k New Delhi

    I've tested shared MR- MR !7 mergeable on Drupal version- 10.3.0-dev. The patch was applied successfully and looks good to me.

    Testing Steps:

    • Add/download Drupal 10.3.0
    • Add/download Module "CKEditor Find/Replace".
    • Go to /admin/config/content/formats- and add Find/Replace to CK Editor.
    • Go to Content/select text format with updated editor. Before patch error attached.
    • Download this share MR and Apply.
    • Go back to the Content and Re-verify this

    Testing Results:
    After applying the patch, the TypeError is resolved, added after result. RTBC++

  • Status changed to Postponed: needs info 2 months ago
  • 🇺🇸United States FatherShawn New York

    This is an opportune time to evaluate retiring this module. The team at CKSource (developers of CKEditor) have released CKEditor 5 Plugin Pack which includes the plugin provided by this module.

    Please evaluate their officially supported module and add a note back if ckeditor_find is still needed.

  • Status changed to Closed: won't fix 2 months ago
  • The plugin pack works. Thanks.

    composer require 'drupal/ckeditor5_plugin_pack:^1.1'
    drush en ckeditor5_plugin_pack ckeditor5_plugin_pack_find_and_replace
    drusn pmu ckeditor_find
    drush cex -y
    
  • I'd suggest marking the module as deprecated if you don't intend to support it alongside the plugin pack, and put a link/reference to the alternative on the module page.

  • 🇺🇸United States FatherShawn New York

    Yes, that's the plan. I needed to test or someone to test the replacement first so thanks for the report

  • 🇺🇸United States jrockowitz Brooklyn, NY

    I can confirm that the above steps work as expected

    composer require 'drupal/ckeditor5_plugin_pack:^1.1'
    drush en ckeditor5_plugin_pack ckeditor5_plugin_pack_find_and_replace
    drusn pmu ckeditor_find
    drush cex -y
    
  • 🇫🇮Finland Alexander Tallqvist

    I can also confirm that this does the trick. No need to configure any settings for the text format.

    composer require 'drupal/ckeditor5_plugin_pack:^1.1'
    drush en ckeditor5_plugin_pack ckeditor5_plugin_pack_find_and_replace
    drush pmu ckeditor_find
    drush cex -y
  • 🇨🇦Canada smulvih2 Canada 🍁

    #10/#11 work for me. I would also add a composer remove drupal/ckeditor_find to remove ckeditor_find from the project.

  • @smulvih You can't do that in the same step if you have CI/CD, because you can't uninstall the module when the code has been removed from the repository.

Production build 0.71.5 2024