Note: this issue was reported in the Linkit queue but is actually related to the Editor Advanced Link module, as described in the comments

Basics

After updating from 7.04 to 7.05 I notice:

  1. The layout of the LinkIt dialogue has been rearranged
  2. The functionality is completely broken in term of offering suggestions
  3. There is an associated JS moan in the Console

Before

previous

After

after

Console report

ckeditor5-dll.js?v=45.2.0:5 Uncaught CKEditorError: Cannot read properties of undefined (reading 'viewUid')
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-Cannot read properties of undefined (reading 'viewUid')
    at i._remove (ckeditor5-dll.js?v=45.2.0:5:667561)
    at i.remove (ckeditor5-dll.js?v=45.2.0:5:665460)
    at i.remove (ckeditor5-dll.js?v=45.2.0:5:631088)
    at editorAdvancedLink.js?v=10.5.0:1:11195
    at Array.forEach (<anonymous>)
    at h._addGroupsToFormView (editorAdvancedLink.js?v=10.5.0:1:11167)
    at C.<anonymous> (editorAdvancedLink.js?v=10.5.0:1:10076)
    at C.fire (ckeditor5-dll.js?v=45.2.0:5:639290)
    at C.set [as visibleView] (ckeditor5-dll.js?v=45.2.0:5:641653)
    at C._showView (ckeditor5-dll.js?v=45.2.0:5:607964)

Ideas

Looks like it might possibly be to do with a clash with the Editor Advanced Link module - that might explain the rearrange layout?

System

Drupal 10.5..0
A custom subtheme Bootstrap5 (Bootstrap5 4.03)
Apache/2.4.33 (Win64) OpenSSL/1.0.2u mod_fcgid/2.3.9
PHP 8.3.7, memory limit: 256M
MySQL 5.7.24
PHP Caching module: OpCache
Chrome Version 131.0.6778.205 (Official Build) (64-bit)

Comments

sirclickalot created an issue. See original summary.

sirclickalot’s picture

Issue summary: View changes
sirclickalot’s picture

Issue summary: View changes
mark_fullmer’s picture

Looks like it might possibly be to do with a clash with the Editor Advanced Link module - that might explain the rearrange layout?

Yes, I note that the console error reported is actually coming from Editor Advanced Link. I think the issue may be with that module (#3531194: D11.2 / D10.5: Uncaught CKEditorError: Cannot read properties of undefined (reading 'viewUid')), and your update to 7.0.5 was just a coincidence.

In fact, release 7.0.5 of Linkit was intended to prevent such an error from occurring. Happy to help troubleshoot further if it does seem to have something to do with Linkit.

steva1982’s picture

After updating from 7.04 to 7.05 I have the same problem.
Disabling "Editor Advanced link" (version 2.2.6), the dialogue layout comes back working...

mark_fullmer’s picture

Title: Broken after update to 7.04 > 7.05 » [Editor Advanced Link] Broken after update to 7.04 > 7.05
Issue summary: View changes
alexgreyhead’s picture

On my build at least, for any version of Drupal core >=10.2.0, the CKEditor link button is completely non-functional, even with Linkit and Editor Advanced Link disabled, database updates run, and caches cleared.

Additionally, there are no console errors triggered by clicking the button.

Reverting back to core 10.1.x fixes the issue.

Not sure how to fix this one... :-/

A

mark_fullmer’s picture

On my build at least, for any version of Drupal core >=10.2.0, the CKEditor link button is completely non-functional, even with Linkit and Editor Advanced Link disabled,

Well, there was a core CKEditor version change between Drupal 10.0 and 10.1, from version 35 to 36, which involved API-breaking changes for implementers of the CKEditor Link widget. But if you're noticing the breakage between 10.1 and 10.2, that might not be the issue.

It sounds like you're doing the right thing by peeling away other factors -- disabling Linkit and Editor Advanced Link -- and I guess you should keep going in that direction. You could also try going the other direction by starting with an installation of the "Standard" install profile and building up the configuration to match your site to find where the breakage occurs. Good luck!

mradcliffe’s picture

This seems like a duplicate of #3531194

Edit: sorry for spam.

mradcliffe’s picture

jamieburchell’s picture

Our custom matcher for Linkit completely broke after updating from 7.0.4 to 7.0.5. We eventually traced it back to seemingly undocumented significant structural changes to the constructor and create methods between these two minor patch releases. Lots of scratching of heads and headaches for two developers and one afternoon. Please don't do that.

mark_fullmer’s picture

Our custom matcher for Linkit completely broke after updating from 7.0.4 to 7.0.5. We eventually traced it back to seemingly undocumented significant structural changes to the constructor and create methods between these two minor patch releases. Please don't do that.

I'm sorry to hear this. As a fellow developer, I feel for you having to sort through something that broke that wasn't your fault, and that was seemingly released in an irresponsible way. I do want to clarify that the changes referred to between the 7.0.4 to 7.0.5 release were only understood to be code syntax rule fixes. In reviewing that work, it simply did not occur to me that switching to dependency injection would affect implementers of the Linkit Matcher class -- and this is the first I've heard of it being a problem. It was not our intent to introduce compatibility-breaking changes to implementers of Linkit classes, so providing the changes (as we understood them) in a patch-level release was semantically correct. In other words, our intentions were pure :) .

I've added a prominent callout in https://www.drupal.org/project/linkit/releases/7.0.5 . Thanks for sharing, and thereby empowering me to be a better maintainer of community-powered code!