Update module erroneously recommends conflicting update to 6.1.x for sites on Drupal 10.0.x or lower

Created on 1 June 2023, over 1 year ago
Updated 22 December 2023, 11 months ago

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 πŸ“Œ LinkIt requires new minor version for Drupal 10.1.x, since CKEditor 5 got a major version update (v35 β†’ v36) Fixed .

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.

πŸ’¬ Support request
Status

Closed: works as designed

Version

6.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States smustgrave

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @smustgrave
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    I'd been holding off until Drupal 10.1.0 was released, but I'm fine going ahead and marking this as supported.

    Done!

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thanks!

    We go live a week after 10.1 releases so went ahead and updated since it's in beta.

  • Status changed to Needs work over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium jelle_s Antwerp, Belgium

    This 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:

    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/linkit ^6.1 -> satisfiable by drupal/linkit[6.1.0-rc1, 6.1.x-dev].
        - drupal/linkit[6.1.0-rc1, ..., 6.1.x-dev] require drupal/core ^10.1 -> found drupal/core[10.1.0-alpha1, 10.1.0-beta1, 10.1.x-dev] but it conflicts with your root composer.json require (^9.2).
    
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    This 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:

    I believe this is a bug/limitation with the Drupal module status API. This project has marked 6.0.0-rc1 as "recommended":

  • πŸ‡§πŸ‡ͺBelgium jelle_s Antwerp, Belgium

    Thank you for your feedback. I created #3364210: Wrong recommended version for LinkIt module β†’ to have it checked.

  • πŸ‡§πŸ‡ͺBelgium jelle_s Antwerp, Belgium

    Ok, 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).

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • πŸ‡§πŸ‡ͺBelgium jelle_s Antwerp, Belgium

    Just 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!

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Just informing if there is any vision on how and/or if this will be fixed.

    My 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.

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    FYI, 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.

  • πŸ‡΅πŸ‡ΉPortugal jrochate

    After 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.

  • πŸ‡³πŸ‡±Netherlands Dimiter

    I 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!

  • πŸ‡§πŸ‡ͺBelgium jelle_s Antwerp, Belgium

    Also, 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"

  • πŸ‡¦πŸ‡ΉAustria maxilein

    Maybe 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.

  • πŸ‡¦πŸ‡ΉAustria agoradesign

    also cannot update from 6.1.0-rc1 to rc2

  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

    Me too I can not update from 6.1.0-rc1 to 6.1.0-rc2
    Using the wiled card ~6.1.0 or ^6.1

  • πŸ‡¦πŸ‡ΉAustria agoradesign

    it doesn't even work, when you specify a fixed version constraint "6.1.0-rc2" (while "6.1.0-rc1" works interestingly)

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Interesting. When I run composer show -a drupal/linkit it is as if the 6.1.0-rc2 release is not found on the Drupal Packagist endpoint at all.

    name     : drupal/linkit
    descrip. : Linkit - Enriched linking experience
    keywords : 
    versions : 6.1.x-dev, * 6.1.0-rc1, 6.0.x-dev, 6.0.0-rc2, 6.0.0-rc1, 6.0.0-beta4, 6.0.0-beta3, 6.0.0-beta2, 6.0.0-beta1, 5.x-dev, 5.0.0-beta13, 5.0.0-beta12, 5.0.0-beta11, 5.0.0-beta10, 5.0.0-beta9, 5.0.0-beta8, 5.0.0-beta7, 5.0.0-beta6, 5.0.0-beta5, 5.0.0-beta4, 5.0.0-beta3, 5.0.0-beta2, 5.0.0-beta1, 5.0.0-alpha1, 4.x-dev, 4.4.0, 4.3.0, 4.2.0, 4.1.0, 4.0.0, dev-6.1.x, dev-6.0.x, dev-5.x, dev-4.x

    ...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.

  • πŸ‡¦πŸ‡ΉAustria agoradesign

    yeah agree, that's the most obvious reason, why the command fails

  • πŸ‡³πŸ‡±Netherlands Dimiter

    Interesting, 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.

  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Full 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

  • πŸ‡΅πŸ‡ΉPortugal jrochate

    I'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).

  • πŸ‡§πŸ‡ͺBelgium jelle_s Antwerp, Belgium

    RE #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

  • πŸ‡ΊπŸ‡ΈUnited States marvs5

    RE #22 πŸ’¬ Update module erroneously recommends conflicting update to 6.1.x for sites on Drupal 10.0.x or lower Closed: works as designed : 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.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    83 pass
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    I get daily update emails from the site when there is nothing to update.

    I 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:

    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

    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."

  • πŸ‡ΊπŸ‡ΈUnited States matthewv789

    I'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.

  • πŸ‡΅πŸ‡ΉPortugal jrochate

    Thank 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.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update about 1 year ago
    Patch Failed to Apply
  • πŸ‡΅πŸ‡ΉPortugal jrochate

    Bump to 6.0.2

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update about 1 year ago
    Composer require failure
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    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.

    Yes, 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 πŸ“Œ LinkIt requires new minor version for Drupal 10.1.x, since CKEditor 5 got a major version update (v35 β†’ v36) Fixed .

    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...

  • Status changed to Active 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • Status changed to Closed: works as designed 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    With 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 🌱 Plan for discontinuing support of 6.0.x branch Active for more background.

Production build 0.71.5 2024