After upgrading Drupal core from 10.5.4 to 10.6.2, I encountered a JavaScript console error that causes the CKEditor 5 editor to break. As a result, the editor toolbar is no longer displayed and CKEditor becomes unusable.

The site is using the following modules: CKEditor 5, anchor_link, ckeditor_media_resize

During troubleshooting, I found that uninstalling the anchor_link module resolves the issue and removes the console error, which indicates a compatibility problem between the anchor_link module and the updated Drupal core / CKEditor 5 integration.

Could you please provide a patch or guidance to make the anchor_link module compatible with Drupal 10.6.2, so it can continue to be used alongside CKEditor 5?

Thanks in advance!

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    arif43 created an issue. See original summary.

    vishal.kadam’s picture

    Component: Miscellaneous » Code
    Priority: Critical » Normal
    druliner’s picture

    I also experienced that CKEditor fails to load after updating to Drupal 10.6.2
    The console error is:
    Uncaught TypeError: (0 , s.mix) is not a function . . . . anchor-drupal.js?t8xad9:31

    If I disable anchor_link module, or simply remove the anchor link icon from the ckeditor toolbar, ckeditor loads correctly again.

    Would appreciate any help finding a solution because our users really like using this module!

    interx’s picture

    This is a duplicate of #3561069: Fix CKEditor Anchor Link Compatibility for Drupal 10.6 / 11.3 (CKEditor5 v46+).

    Untill the new release with the correct dependency, you can update manually to the latest version of vardot/ckeditor5-anchor-drupal.

    composer require vardot/ckeditor5-anchor-drupal:2.0.4

    arifhaque’s picture

    Thanks @interx, composer require vardot/ckeditor5-anchor-drupal:2.0.4 fixed the issue!

    vmarchuk’s picture

    I can also confirm that composer require "vardot/ckeditor5-anchor-drupal:^2.0" solved the problem!

    rajab natshah’s picture

    Status: Active » Fixed

    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.

    rajab natshah’s picture

    Status: Fixed » Closed (fixed)