When Drupal core's "Update" module is enabled, sites running on Drupal 9.5.x or 10.0.x and using Linkit will show a recommendation to update to Linkit 6.1.x.
However, this is not correct update information, as sites running Drupal versions 10.0.x and below need to use Linkit 6.0.x, while sites running on Drupal 10.1.x and above need to use Linkit 6.1.x. This is due to different version requirements with CKEditor, as described in #3350252: LinkIt requires new minor version for Drupal 10.1.x, since CKEditor 5 got a major version update (v35 → v36).
This compatibility is correctly enforced by the Composer version requirements and by the requirements set in the info.yml file for Linkit. However, the "Update" module appears not to be able to distinguish between the minor version requirement differences.
Root cause
The "Update" module suggests the latest available minor version update of a contrib module, regardless of its compatibility with the Drupal version used on the site. It ignores the version constraints defined in the contrib module's info.yml file.
| Comment | File | Size | Author |
|---|---|---|---|
| #30 | 3363992_update_version_29.patch | 795 bytes | jrochate |
| #26 | 3363992_update_version_26.patch | 795 bytes | mark_fullmer |
Comments
Comment #2
mark_fullmerI'd been holding off until Drupal 10.1.0 was released, but I'm fine going ahead and marking this as supported.
Done!
Comment #3
smustgrave commentedThanks!
We go live a week after 10.1 releases so went ahead and updated since it's in beta.
Comment #4
jelle_sThis created an other issue on Drupal 9 installations that are on 6.0.0-rc1. It reports an update being available, while it's incompatible with D9:
Comment #5
mark_fullmerI believe this is a bug/limitation with the Drupal module status API. This project has marked 6.0.0-rc1 as "recommended":
Comment #6
jelle_sThank you for your feedback. I created #3364210: Wrong recommended version for LinkIt module to have it checked.
Comment #7
jelle_sOk, so based on drumms feedback the infrastructure works as designed. I'm gonna create a core issue since the update status overview page does not take the core compatibility of the modules into account. https://updates.drupal.org/release-history/linkit/current clearly states 6.1.0-rc1 is only compatible with D10, and thus should not be mentioned as recommended update on the overview page of a D9 site imho.
<core_compatibility>^10.1</core_compatibility>Edit:
Bummer, seems like #3076183: [Meta] Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core has existed for a while now, but no real activity in that issue itself since 2021.
A quick fix could be to move the D10 only support to a 7.x branch, and keep the 6.x branches for D9 compatibility (alternatively, keep the 6.x branches for compatibility with both D9 and D10).
Comment #8
mark_fullmerComment #9
jelle_sJust informing if there is any vision on how and/or if this will be fixed. Our monitoring is reporting this update for a lot of our sites now, cluttering our overview. Thanks!
Comment #10
mark_fullmerMy position continues to be that this is a limitation in the way that Drupal core's "Update" module reports supported/recommended versions when it comes to alpha/beta releases of minor version releases (e.g., 6.0.0-beta1 vs 6.1.0-beta1).
Given that Drupal 10.1.0 is imminent, I feel that it is best to keep listing 6.1.0-beta1 as "supported" rather than marking it as "unsupported," and in the meantime, sites that are running on 10.0.x and using the "Update" module for determining what versions they should use rather than using Composer should patiently tolerate the noise until 10.1.0 is released.
Comment #11
mark_fullmerFYI, Drupal 10.1.0 has been released: https://www.drupal.org/project/drupal/releases/10.1.0
I'll wait to hear from folks to see if this resolves "noise" they're getting in the Update module, but I assume that there is no further action that needs to be taken in Linkit, and we'll be able to close this issue.
Comment #12
jrochate commentedAfter cache clear and rescan modules, I'm still having the "noise" warning about an available update to a version I don't have.
The only way to avoid this is to run 6.0.x-dev, but sometimes that is not allowed due to project's policy.
Comment #13
dimiter commentedI had the same problem as @jrochate's reported.
After some trial and error, I think I found out what the problem is:
- linkit 6.0@RC requires Drupal-core version to be with 10.0.X range
- linkit 6.1@RC requires Drupal-core version to be within 10.1.X range
What happens is that when running
composer update "drupal/core-*" --with-all-dependencies(as instructed on the release 10.1 page), it won't actually update core-recommended to 10.1 as that wouldn't match the constraints allowed by linkit 6.0@rc (so having linkit 6.0 as a dependency prevents upgrading to Drupal 10.1). However, the other way around also won't work: You can't update linkit to 6.1@rc if your Drupal/core(-recommended) is still on 10.0, as that wouldn't match the version constraints provided by linkit 6.1 (which requires Drupal 10.1 to already be installed).The workaround I ended up using is to update both dependencies in one go:
composer update drupal/core-* drupal/linkit:^6.1@RC --with-all-dependencies(which will work given that Drupal 10.0 and linkit 6.0 were already required in the project earlier and their versions are not constant in the composer.json file).I hope this might save some of you some time!
Comment #14
jelle_sAlso, the problem we're experiencing is Drupal 9 vs Drupal 10, not 10.0 vs 10.1
Linkit 6.0.x is compatible with both D9 & D10, while 6.1.x is only compatible with D10, even tho it's just a minor version update, which (besides the quirky "recommended release" Drupalism) is the main reason the update module reports it as an "available update"
Comment #15
maxilein commentedMaybe a new symptom of this issue:
composer require 'drupal/linkit:^6.1@RC' does not upgrade from RC1 to RC2. It just does nothing.
While the dev version (composer require 'drupal/linkit:6.1.x-dev@dev') correctly installs the latest dev.
Comment #16
agoradesign commentedalso cannot update from 6.1.0-rc1 to rc2
Comment #17
rajab natshahMe too I can not update from
6.1.0-rc1to6.1.0-rc2Using the wiled card
~6.1.0or^6.1Comment #18
agoradesign commentedit doesn't even work, when you specify a fixed version constraint "6.1.0-rc2" (while "6.1.0-rc1" works interestingly)
Comment #19
mark_fullmerInteresting. When I run
composer show -a drupal/linkitit is as if the 6.1.0-rc2 release is not found on the Drupal Packagist endpoint at all....and yet, the tag is there, and looks correct: https://git.drupalcode.org/project/linkit/-/tags
I'll investigate more, but will probably end up packaging another release to try to resolve this issue with 6.1.0-rc2.
Comment #20
agoradesign commentedyeah agree, that's the most obvious reason, why the command fails
Comment #21
dimiter commentedInteresting, having the same issue. Digging slightly further, I found that composer sources the linkit versions/packages from https://packages.drupal.org/files/packages/8/p2/drupal/linkit.json and https://packages.drupal.org/files/packages/8/p2/drupal/linkit~dev.json , where the 6.1.0-rc2 version is nowhere to be found. According to https://www.drupal.org/docs/develop/using-composer/using-packagesdrupalorg , the solution would be for @mark_fullmer to file an issue here: https://www.drupal.org/project/issues/project_composer . A new release might also possibly fix this.
Comment #22
mark_fullmerFull releases have been tagged, as indicated below. If someone who previously was encountering issues updating can confirm that these non-RC releases resolve your issue, that'd be great.
- https://www.drupal.org/project/linkit/releases/6.1.0 : Compatible with Drupal 10.1+
- https://www.drupal.org/project/linkit/releases/6.0.0 : Compatible with Drupal 9.4.x -> 10.0.x
Comment #23
jrochate commentedI'm sorry, but it's still showing the outdated drupal installation warning like before.
I have removed linkit and reinstalled (using composer require 'drupal/linkit:^6.0' to install) and I'm still having the Warning like #12 image.
Here is an example of a module that has a more recent version, starting with Drupal 10, but it is no listed as a Warning.
I think this is the desired behaviour since the Warning will tint Drupal instalations with impossible resolution (besides from updating to Drupal 10).
Comment #24
jelle_sRE #23: That is indeed the desired behaviour I would say. The difference there is that the "new" version is a major version change (1.0.x -> 2.0.x) and for the linkit module it's a minor version change (6.0.x -> 6.1.x). In semantic versioning, there should be no BC breaks between minor versions, and (imho) dropping support for a version of Drupal core is a BC break. Either way, the reason Drupal update reports it as a warning is because it's only a minor update and so it should be possible to update to that version
Comment #25
marvs5 commentedRE #22: This is still a problem. Running D9.5.10 with Linkit 6.0.0. I get daily update emails from the site when there is nothing to update.
Comment #26
mark_fullmerI hear your frustration. Not only are erroneous emails annoying, if they regard module updates, wrongheaded ones can lead to a "Boy who cried wolf" situation where people disregard the important messages.
Taking Jelle_S's interpretation as the root cause, I conclude that this is a limitation in the design of the core "Update" module in how it is interpreting available updates, rather than an actual problem in the Composer version constraints in the 6.0.0 and 6.1.0 releases of this module:
To me, it seems like the right path to resolve this is to contribute to the "Update" module in core to make it more intelligent about its recommended updates. In lieu of a core fix, I've attached a patch for the Linkit module that effectively says "If the site is using Linkit 6.0.0 and is on a version of Drupal core < 10.1, consider this up-to-date."
Comment #27
matthewv789 commentedI'm going to agree with Jelle_S. Any version that breaks backward compatibility should not be a minor version update, it should be a new major version. The failure to do so is the cause of this problem. It is not Drupal's fault, or anything that should be patched around, it's simply that the release was misnamed from the beginning, and is still misnamed.
Comment #28
jrochate commentedThank you for your effort @mark_fullmer. Surely not the best option, but your patch minimizes the impact you just named.
Now there is no warning. Good.
Comment #29
jrochate commentedBump to 6.0.2
Comment #30
jrochate commentedComment #31
mark_fullmerYes, this definition of the line for major vs. minor Semver releases is a good starting point! In this case, however, the conditions are more nuanced, involving a backwards compatibility-breaking change introduced between CKEditor version 5.35 and 5.36. Drupal core packaged this B/C break in Drupal 10.1, a minor version release. Sites (or contrib modules!) that were built with CKEditor 5.35 API dependencies had to navigate the minor version update from Drupal 10.0 to Drupal 10.1 with a backwards-compatibility-breaking change in CKEditor. For more background, see #3350252: LinkIt requires new minor version for Drupal 10.1.x, since CKEditor 5 got a major version update (v35 → v36).
Another contrib module that provides a CKEditor integration, Editor Advanced Link, followed suit, handling this change in a minor version release (2.1.x to 2.2.x). See https://www.drupal.org/project/editor_advanced_link/releases/2.2.0
Another useful perspective is this article describing Drupal core's own nuanced handling of major/minor version releases due to complexities of handling compatibility with PHP, Symfony, and CKEditor dependencies: https://www.thirdandgrove.com/insights/closer-look-drupals-new-major-rel...
Comment #32
mark_fullmerComment #33
mark_fullmerComment #34
mark_fullmerWith Drupal 9.5.x and 10.0.x no longer supported, I feel it is appropriate to close this issue. The 6.0.x branch of Linkit, which is compatible with Drupal 9.5.x and 10.0.x, will remain supported until November 2024, allowing sites time to update to the supported version of Drupal core.
See #3410566: Plan for discontinuing support of 6.0.x branch for more background.