Problem/Motivation

The ck5 upgrade included in Drupal 11.2.10/ 11.3.2 and Drupal 10.6.2 breaks codemirror 5.6.20 and lower.

Upgrade is needed

Made a pull request upstream with the fix:
https://github.com/codemirror/codemirror5/pull/7154

History explained here:
#3531472: Drupal 10.5 / 11.2 incompatibility

Steps to reproduce

Install wxt 5.6.x , wxt 6.2.x
add content
view source mode, notice codemirror exception in javascript console and missing codemirror enhancements/functionality.

Proposed resolution

composer require codemirror/codemirror:'^5.65.21'

Remaining tasks

Update wxt composer.json accordingly

User interface changes

Restore codemirror functionality, resolve ck5+codemirror regression.

API changes

See proposed resolution.

Data model changes

N/A

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

Assigned: joseph.olstad » smulvih2
Status: Active » Reviewed & tested by the community
joseph.olstad’s picture

Status: Reviewed & tested by the community » Needs review
joseph.olstad’s picture

            "codemirror/codemirror": {
               "#3531472: Drupal 10.5 / 11.2 incompatibility": "https://www.drupal.org/files/issues/2025-11-13/ckeditor_codemirror-codemirror-LIBRARY-3531472-copyobj-hasownproperty-fix.diff"
            },
joseph.olstad’s picture

  • smulvih2 committed 417ae830 on 6.2.x
    Issue [#3572232] - Patch codemirror/codemirror to fix CKE5 regression...
joseph.olstad’s picture

Version: 6.2.x-dev » 5.6.x-dev

5.6.x also needs this.

With that said, I've accelerated an upstream fix, contacted both maintainers of ckeditor_codemirror with a solution on a silver platter.

Maybe hold off a few days , we'll probably get a patchless fix that allows us to pin to a new minimal ckeditor_codemirror. We'll make a new issue to replace the patch for 6.2.x when the time comes.

#3531472: Drupal 10.5 / 11.2 incompatibility

joseph.olstad’s picture

Version: 5.6.x-dev » 6.2.x-dev
Assigned: smulvih2 » Unassigned
Status: Needs review » Fixed

this was fixed upstream. I'll make a new ticket to unwind our patch.

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.

joseph.olstad’s picture

Status: Fixed » Needs review

actually, see the composer-extdeps PR in the related issue, I'll link it here.

joseph.olstad’s picture

joseph.olstad’s picture

joseph.olstad’s picture

Title: codemirror needs higher minimal version with wxt 5.6/6.2/6.3 and possibly also 5.5 » codemirror patch
Version: 6.2.x-dev » 5.6.x-dev
Status: Needs review » Fixed

Ok the patch was applied, however upstream was fixed and now we need to back off this patch after merging the composer-extdeps solution. I'll mark this as fixed and we can switch over to the other ticket.

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.

smulvih2’s picture

Title: codemirror patch » Upgrade codemirror to ^5.65.21

Status: Fixed » Closed (fixed)

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

joseph.olstad’s picture

Assigned: Unassigned » joseph.olstad
Priority: Normal » Critical
Status: Closed (fixed) » Needs work

The codemirror upgrade isn't working out so well. Perhaps we were better off with patching 5.65.8

Explanation: Lots of markup in a ckeditor5 editor
maximize the editor in source mode.

Now try to scroll down. Cannot go down to the lower part of the markup.

Appears to be a javascript issue.

I don't recall seeing this with 5.65.8 patched, however will have to try it again myself to be sure.

Assigning this to myself, making it high priority.

joseph.olstad’s picture

Status: Needs work » Active
Related issues: +#3480120: CKE5: Dropdown Image Style broken

still investigating , might not be any issue with vanilla wxt, will check.

joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned
Status: Active » Fixed

Reviewed this upgrade, it's good, the issue I noticed was an edge case related to having a small amount of markup (drupal-embed elements) and a large amount of content in non-source mode.

The editor is working well.

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.

Status: Fixed » Closed (fixed)

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