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
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:
- 3273973-micon-linkit-incompatibility
changes, plain diff MR !7
Comments
Comment #2
anybodyComment #3
anybodyComment #4
anybody@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+!
Comment #6
anybodyComment #7
anybodyComment #8
anybodyOnce this is committed to reflect the incompatibility, we should set this back to "needs work" and implement the compatibility!
Comment #11
grevil commentedChange 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.
Comment #12
anybodyThanks @Grevil! Linking the commit message is perfect, thanks!
Comment #13
anybodyLet's target the next job with the title :)
Comment #14
anybodyComment #15
grevil commentedYea, 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:
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!
Comment #16
grevil commentedOK, 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.
Comment #17
grevil commentedSeperate issue here:
#3298600: Create a micon + linkit (and micon + linkit + link_attributes) submodule