Problem/Motivation

The required library vardot/ckeditor5-anchor-drupal uses functions that are deprecated in CKEditor5 v45 and were removed in v46. See https://ckeditor.com/docs/ckeditor5/latest/updating/guides/update-to-46.html

Also, we decided to use this occasion to clean up the code from @deprecated code that was stale for several years.

utils: Removed the deprecated mix function.

Steps to reproduce

  1. Use Drupal 10.6 or 11.3 and anchor_link 3.0.3
  2. Enable anchor_link
  3. Add Anchor Link Button to text format "Basic HTML"
  4. Create a new Article
  5. Open Developer Console and see Uncaught TypeError: s.mix is not a function

Proposed resolution

Update vardot/ckeditor5-anchor-drupal and replace deprecated functions.
I created a Pull Request on GitHub: https://github.com/Vardot/ckeditor5-anchor-drupal/pull/17

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 anchor_link-3.0.4

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • fix: #3561069 Fix CKEditor Anchor Link Compatibility for Drupal 10.6 / 11.3 (CKEditor5 v46+)
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

hosterholz created an issue. See original summary.

hosterholz’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Active » Needs work

Thanks, Hendrik, for reporting this.
Let’s work on it before the release of Drupal 10.6/11.3.
We could manage a release before the stable release within the same week.
Planed to support with the 3.0.x branch, and if we need we can create a new 3.1.x branch.
Changing the status to Needs work

bailsbails’s picture

This also seems to be an issue on sites upgrading from 10.4.X to 10.5.X.

hosterholz’s picture

@rajab-natshah Please review PR #17 on GitHub. The Fix works with CKEditor5 v45 (Drupal 10.5/11.2) and CKEditor5 v47 (Drupal 10.6/11.3). With just a new release of vardot/ckeditor5-anchor-drupal anchor_link can be made compatible with the next Drupal versions.
I built the ckeditor plugin against CKEditor5 v45. Building against v47 requires another change, but the v45 plugin works fine with v47.
What work is needed to get this released?

rajab natshah’s picture

Priority: Normal » Major
Status: Needs work » Needs review

Thanks, Hendrik for following up

✅ Released Vardot/ckeditor5-anchor-drupal 2.0.4
https://github.com/Vardot/ckeditor5-anchor-drupal/releases/tag/2.0.4
https://packagist.org/packages/vardot/ckeditor5-anchor-drupal#2.0.4

Needs more testing with:

  • Drupal ~10.5.0
  • Drupal ~10.6.0
  • Drupal ~11.2.0
  • Drupal ~11.3.0
rajab natshah’s picture

Title: Drupal 10.6/11.3 compatibility » Add Drupal 10.6/11.3 compatibility for CKEditor Anchor Link module and library
rajab natshah’s picture

Title: Add Drupal 10.6/11.3 compatibility for CKEditor Anchor Link module and library » Fix CKEditor Anchor Link Compatibility for Drupal 10.6 / 11.3 (CKEditor5 v46+)
jan kellermann’s picture

Thank you!
Version 2.0.4 works for me with Drupal 10.6.

bwaindwain’s picture

v2.0.4 works good for me with Drupal 10.6.1 and 11.3.1

rajab natshah’s picture

Status: Needs review » 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.

elaine.ong’s picture

Looking forward for the release of the module with the fix.

hosterholz’s picture

@elaine.ong There is no change in the code of the module itself, only in the library it depends on. You can just update the library to apply this fix: composer update vardot/ckeditor5-anchor-drupal:^2.0.4

phoang made their first commit to this issue’s fork.

phoang’s picture

Status: Fixed » Needs review

We actually need to bump up the vardot/ckeditor5-anchor-drupal:2.0.4 in module library. I just updated the PR and we need the module release for the fix. @rajab-natshah

bwaindwain’s picture

Looks good to me. +1RTBC

rajab natshah’s picture

Status: Needs review » 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.

Status: Fixed » Closed (fixed)

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

phoang’s picture

@rajab natshah why do you not plan to update these files from the MR !19 mergeable

composer.json
composer.libraries.json

rajab natshah’s picture

Thanks, Phuoc, for your further follow up and reminding.
Moving with your change.

rajab natshah’s picture

Issue summary: View changes
Issue tags: +anchor_link-3.0.4
rajab natshah’s picture

Issue summary: View changes

✅ Released anchor_link-3.0.4