Problem/Motivation

When I upgrade from Drupal 10.3.10 to D10.4.x, the formatted edition text boxes for ACE or even CKEditor no longer work.

I get the following error in the js console:

drupal.js?v=10.4.1:64 Uncaught TypeError: Cannot read properties of undefined (reading 'attach')
    at Drupal.editorAttach (editor.js?v=10.4.1:304:37)
    at editor.js?v=10.4.1:228:18
    at Array.forEach (<anonymous>)
    at Object.attach (editor.js?v=10.4.1:211:52)
    at drupal.js?v=10.4.1:166:24
    at Array.forEach (<anonymous>)
    at Drupal.attachBehaviors (drupal.js?v=10.4.1:162:34)
    at big_pipe.js?v=10.4.1:153:10
    at big_pipe.js?v=10.4.1:184:3

If I go back to 10.3.10 or delete the ACE module, editable zone formatting works again.

Steps to reproduce

  • Install the ACE module and Drupal 10.4.1.
  • It should also have the test format configured to use ACE in “/admin/config/content/formats”.
  • and try to modify an Article node, for example.

Proposed resolution

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

Comments

steveoriol created an issue. See original summary.

steveoriol’s picture

Issue summary: View changes
steveoriol’s picture

Issue summary: View changes
marioki’s picture

This looks similar to https://www.drupal.org/project/ace_editor/issues/3411396
The solution to the issue above is already in the new release but it seems to sometimes fail anyway since Drupal 10.4.x
I tested this on two of our Drupal pages, eerily enough Ace Editor still works when Ace Editor is the current Editor for the text format. Changing to a text format with CKEditor works as well. But when the default Editor is CKEditor, it doesn't load properly, changing the text format doesn't do anything. Disabling ace editor as a module or not deactivating ace editor in all text formats makes CKEditor work again as well.
Any ideas?

Edit: Found a relevant Core Issue: https://www.drupal.org/project/drupal/issues/3496329 Patch #33 works

steveoriol’s picture

rajab natshah’s picture

Status: Active » Closed (duplicate)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.