Problem/Motivation

Follow-Up on: #3158782: Linkit widget support
Using this with linkit 5 or 6 in Drupal 9 (4.x is not Drupal 9 compatible), breaks the form display page (admin/structure/types/manage/page/form-display) with:

Error: Class "Drupal\linkit\Plugin\Field\FieldWidget\LinkitWidget" not found in include() (line 22 of modules/contrib/micon/micon_linkit/src/Plugin/Field/FieldWidget/MiconLinkitWidget.php).

after the micon_linkit module.

Steps to reproduce

Proposed resolution

Until this issue is fixed, use linkit:linkit (<=4) in the dependencies to point out the incompatibility with later releases
Fix the compatibility with linkit:linkit (^5 || ^6), if they are both compatible, otherwise we should focus on ^6, see #3045822: Linkit 6.0 stable release plan
Update the core_version_requirement and dependencies of this submodule in 2.1.0 to be usable in Drupal 9 again.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork micon-3273973

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

Anybody created an issue. See original summary.

anybody’s picture

anybody’s picture

Issue summary: View changes
anybody’s picture

@Maintainers: Any plan to fix this? I'll create a MR to document the incompatibility until this is fixed. But it would be better to have this compatible for Drupal 9 and 10! Currently this is unusable with Drupal 9+!

anybody’s picture

Status: Active » Needs review
anybody’s picture

Issue tags: +Needs follow-up
anybody’s picture

Once this is committed to reflect the incompatibility, we should set this back to "needs work" and implement the compatibility!

  • Grevil committed 285328a on 2.x
    Added linkit notice, related to Issue #3273973
    
grevil’s picture

Status: Needs review » Needs work

Change is committed to 2.x dev!

The merge request was out of date, since all submodules were moved into the appropriate "modules" folder, see #3298308: Move submodules into submodule folder.
Since this is a very small change, rebasing this would have taken longer.

anybody’s picture

Thanks @Grevil! Linking the commit message is perfect, thanks!

anybody’s picture

Title: Micon Linkit Widget not compatible with Linkit:^5 || ^6 » Make Micon Linkit Widget compatible with Linkit:^5 || ^6

Let's target the next job with the title :)

anybody’s picture

Issue summary: View changes
Related issues: +#3045822: Linkit 6.0 stable release plan
grevil’s picture

Yea, I don't thing this is fixable, since Linkit does not have support for Link Fields, only for WYSWYG Links. I am not sure if it ever had Link Field support, but they say on their page:

The 8.x-5.x has removed support for link attributes. If you are in need for link attributes, please see D8 Editor Advanced link

I am unsure what they mean with "link attributes", maybe link fields? I don't know...

For the time being, we should consider removing the micon_linkit module and add support for wysiwyg Links in the future, so the tests can run again.

As a suggestion, we could hook into the "Text formats and editors" -> "CKEditor plugin settings" -> "Drupal link" setting, provided by Linkit and add a "Micon enabled" Checkbox, so when somebody inserts a link inside a wysiwyg editor, we can add the micon icon widget right there!

grevil’s picture

Status: Needs work » Closed (won't fix)
Issue tags: -Needs follow-up

OK, apparently all of "micon_linkit" depends on a patch created in #2712951: Linkit for Link field. Unfortunately, this is nowhere documented inside "micon_linkit" itself...

I am going to remove the submodule from 2.x, and create a separate issue with a fork and patch containing the old code.

grevil’s picture