Drupal 10 version

Created on 19 September 2023, about 1 year ago
Updated 1 May 2024, 5 months ago

Problem/Motivation

The current version is not Drupal 10 compliant. Drupal 9 will be end of life shortly

Is there anyone working on a Drupal 10 version?

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada AvO WebWorks Ottawa, Ontario, Canada

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

Comments & Activities

  • Issue created by @AvO WebWorks
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa

    I am wondering the same, is it possible to be a co-maintainer of this module? I'd like to help releasing a D10 version of this module.

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    The DEV release appears to support D10, but I'm struggling to upgrade from D9 using the DEV release (which has the various patches applied from πŸ“Œ Automated Drupal 10 compatibility fixes Needs review due ti module dependencies

    When updating via Composer I have a stream of problems, mostly due to the dependency on renanbr/crossref-client which has a dependency on guzzlehttp/guzzle ^6.2 or ^7.4. In D10 guzzlehttp/guzzle is fixed at ^7.5 by drupal/core

    https://github.com/renanbr/crossref-client/blob/main/composer.json list the dependencies, but if I run `composer why guzzlehttp/guzzle` (without being able to download either drupal/bibcite_crossref:2.0.x-dev@dev or renanbr/crossref-client via Composer) I get:

    drupal/core 10.1.6 requires guzzlehttp/guzzle (^7.5)
    drush/drush 12.4.2 requires guzzlehttp/guzzle (^7.0)
    php-http/guzzle7-adapter 1.0.0 requires guzzlehttp/guzzle (^7.0)

    (Also tried drupal/core:^10.0)

    I can download version 0.1.0 if I run `composer require renanbr/crossref-client` but this is a pre-release version that has no dependencies on Guzzle, so doesn't meet the requirements of bibcite_crossref

    Is there anyway to get around the dependency version issue on renanbr/crossref-client or guzzlehttp/guzzle? There appears to be no way to download and install this module in D10 (hence change issue priority to Critical).

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    Have created an issue at https://github.com/renanbr/crossref-client/issues/18 - with a patch to change the version of guzzle to ^7.5 but I don't seem to be able to use Lenient (https://github.com/mglaman/composer-drupal-lenient) to apply it.

    Seems only way forward is to uninstall this module to get site running in D10

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    Probably more appropriate to change this to 'Bug report' as the formal release of this module is tied to D9 which has reached end of life, and AFAIK it doesn't appear to be possible to install on D10...

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    Having taken a hit on DOI lookup functionality, I disabled this module to allow the site to be upgraded to D10.1 (and removed from Composer.json).

    I'm not able to download the module via Composer:
    `composer require 'drupal/bibcite_crossref:2.0.x-dev@dev'` results in

    Your requirements could not be resolved to an installable set of packages.

    Problem 1
    - cache/array-adapter[1.0.0, ..., 1.0.1] require php ^5.6 || ^7.0 -> your php version (8.1.16) does not satisfy that requirement.
    - cache/array-adapter 1.1.0 requires psr/cache ^1.0 -> found psr/cache[1.0.0, 1.0.1] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - cache/array-adapter[1.1.x-dev, ..., 1.2.0] require psr/cache ^1.0 || ^2.0 -> found psr/cache[1.0.0, 1.0.1, 2.0.0] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - renanbr/crossref-client[1.0.0, ..., 1.1.0] require guzzlehttp/guzzle ^6.2 -> found guzzlehttp/guzzle[6.2.0, ..., 6.5.x-dev] but the package is fixed to 7.8.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - drupal/bibcite_crossref dev-2.0.x requires renanbr/crossref-client ^1.0 -> satisfiable by renanbr/crossref-client[1.0.0, 1.1.0, 1.1.1].
    - drupal/bibcite_crossref 2.0.x-dev is an alias of drupal/bibcite_crossref dev-2.0.x and thus requires it to be installed too.
    - renanbr/crossref-client 1.1.1 requires cache/array-adapter ^1.0 -> satisfiable by cache/array-adapter[1.0.0, ..., 1.2.0].
    - Root composer.json requires drupal/bibcite_crossref 2.0.x-dev@dev -> satisfiable by drupal/bibcite_crossref[2.0.x-dev (alias of dev-2.0.x)].

    Add in dependencies `composer require 'drupal/bibcite_crossref:2.0.x-dev@dev' -W` results in:

    Your requirements could not be resolved to an installable set of packages.

    Problem 1
    - rtheunissen/guzzle-rate-limiter[v1.0.0, ..., v1.0.1, v2.0.0] require guzzlehttp/guzzle ~6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but these were not loaded, likely because it conflicts with another require.
    - renanbr/crossref-client[1.0.0, ..., 1.1.0] require guzzlehttp/guzzle ^6.2 -> found guzzlehttp/guzzle[6.2.0, ..., 6.5.x-dev] but these were not loaded, likely because it conflicts with another require.
    - drupal/bibcite_crossref dev-2.0.x requires renanbr/crossref-client ^1.0 -> satisfiable by renanbr/crossref-client[1.0.0, 1.1.0, 1.1.1].
    - drupal/bibcite_crossref 2.0.x-dev is an alias of drupal/bibcite_crossref dev-2.0.x and thus requires it to be installed too.
    - renanbr/crossref-client 1.1.1 requires rtheunissen/guzzle-rate-limiter ^1.0 || ^2.0 -> satisfiable by rtheunissen/guzzle-rate-limiter[v1.0.0, v1.0.1, v2.0.0].
    - Root composer.json requires drupal/bibcite_crossref 2.0.x-dev@dev -> satisfiable by drupal/bibcite_crossref[2.0.x-dev (alias of dev-2.0.x)].

    I also tried deleting composer.lock as it looks like there are circular dependencies, but that's opened up a different can of worms.

    Unless it's just me (and it could be, but there are not many users of this module), @AardWolf I'd still say this is a Critical Bug.

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    I've just set up a bare D10.1 site (to replicate the problem) and the DEV release cannot be installed with Composer. Same error traces as reported in #7

  • πŸ‡¨πŸ‡¦Canada AvO WebWorks Ottawa, Ontario, Canada

    I am having the same issues and not able to install this on upgrade to Drupal 10 nor on a bare Drupal 10 site either. Same errors as reported in #7.

  • πŸ‡³πŸ‡±Netherlands uberengineer

    The issue is:
    bibcite_crossref 2.0.x-dev requires renanbr/crossref-client ^1.0
    renanbr/crossref-client ^1.0 requires rtheunissen/guzzle-rate-limiter ^2.0
    rtheunissen/guzzle-rate-limiter ^2.0 requires guzzlehttp/guzzle ^6.0

    rtheunissen/guzzle-rate-limiter 3.0 resolves the guzzlehttp/guzzle ^7.0 dependency however renanbr/crossref-client needs updating to reflect this in the dependency chain

    I have a review pending that resolves the dependencies https://github.com/renanbr/crossref-client/pull/19

    Once this is merged bibcite_crossref can be updated to require the correct version for renanbr/crossref-client

  • @uberengineer opened merge request.
  • πŸ‡³πŸ‡±Netherlands uberengineer

    renanbr/crossref-client pull request merged, Requiring main branch as the module is as of yet not versioned

    Forked repo branch "dev-3388342-drupal-10-version" now installs on Drupal core 10.1.6 and MR created

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    Thanks for your work @uberengineer.

    However, I cannot get the module to install via Composer. I've installed Lenient and Composer Patches (see https://github.com/mglaman/composer-drupal-lenient) and tried installing the DEV branch of Bibcite Crossref with the MR applied as a diff patch, but the error traces (as at #7) are still present.

    I see your changes are now in the main branch of renanbr/crossref-client so I'm assuming we need to wait until there's a new formal release of crossref-client before installation of bibcite_crossref will work.

  • πŸ‡¨πŸ‡¦Canada AvO WebWorks Ottawa, Ontario, Canada

    I've uploaded a patch file for now until the merge request is in place. This way @robcarr can test as well.

  • Status changed to Fixed 11 months ago
  • πŸ‡¨πŸ‡¦Canada AvO WebWorks Ottawa, Ontario, Canada

    Great. So I was able to install this on a clean Drupal 10 install but in composer under required:
    "drupal/core": "^10.1",
    instead of
    "drupal/core-recommended": "^10.1",
    The core-recommended gave me the composer error:
    psr/cache[1.0.0, 1.0.1] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

    As soon as I moved to core instead of core-recommended I was able to install.
    @robcarr this may help you, as I see you were also getting that error message in composer.

    Thanks everyone for your work on getting this module working for Drupal 10!!

  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    I still seeing the psr/cache error with the 'core-recommended' clean D10.1 installation.

    I'm sceptical about saying that this bug is 'fixed' if it doesn't work with the recommended D10 distribution.

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

    @AvO WebWorks Is the module working for you in Drupal 10, or just installing cleanly?

    @robcarr The psr/cache error you're seeing is during composer tasks, or when actually using the DOI lookup functionality in your site?

    I agree that the issue shouldn't be considered "fixed" if we can't use "core-recommended".

    -------

    But also, when we do all the fiddling to composer-install the latest dev version of this module on a Drupal 10.1 site, we get a WSOD + fatal error when we try to use the DOI Lookup tool, so that's why I'm wondering if the module is really working for you, @AvO WebWork, or is it just composer-installing? I'm not sure if this error we're getting belongs in this thread, a new thread, or the renanbr/crossref-client project, I welcome advice on that front -- I do know that the module definitely isn't working for us on Drupal 10.1 πŸ™‚ Here's the fatal error (seen on /admin/content/bibcite/reference/lookup) -- we can re-file elsewhere if necessary, I just didn't want to say "it's not working for us but I'm not going to tell you any details":

    Fatal error: Declaration of RenanBr\CrossRefClient\RateLimitProvider::getLastRequestTime() must be compatible with Concat\Http\Middleware\RateLimitProvider::getLastRequestTime(Psr\Http\Message\RequestInterface $request) in /code/vendor/renanbr/crossref-client/src/CrossRefClient/RateLimitProvider.php on line 37
    
  • πŸ‡¬πŸ‡§United Kingdom robcarr Perthshire, Scotland

    @alison - the error I'm seeing is generated by Composer. I've not tested the module, as it cannot be installed without the various hacks: it is important for this to work on a production site that was recently migrated to D10 (so this site currently has no DOI lookup).
    From the WSOD error I'd assume there's an error with the function getLastRequestTime() which must be linked to the class AbstractRateLimitProvider (presumably somewhere in the Guzzle world, but I can't track that down...), which may mean there's an error creeping in because this module's dependencies are now required to support multiple versions.

  • Status changed to Active 10 months ago
  • You're partially right about status of this issue. We applied patch which you suggested with modification. And we installed bibcite crossref to the drupal core 10.
    If it's fatal now then the reason in renanbr/crossref-client. We'll make research asap, but you also can make it and suggest another one MR to library.
    The reason module can't be installed for recommended version of Drupal is dependency on psr/cache and as result cache/array-adapter. We'll research it too, but the most possible it is issue in core, not in module or library.

  • πŸ‡³πŸ‡±Netherlands uberengineer

    Created pull request for renanbr/crossref-client https://github.com/renanbr/crossref-client/pull/24
    This resolves the error from #21

    When commit is merged the commit hash needs to be removed from the composer requirements for renanbr/crossref-client

  • πŸ‡³πŸ‡±Netherlands uberengineer

    Also having this issue
    Error: Call to undefined method GuzzleHttp\Utils::json_encode() in Drupal\bibcite_crossref\CrossrefClient->requestRaw()
    Which is resolved with 3388342-25.patch

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

    Here's how I got this installed via composer on Drupal 10 (10.2.5):

    Prerequisites: require cweagans/composer-patches

    In your composer.json file, add the following to your "repositories" (before the drupal.org repository):

            {
                "type": "git",
                "url": "https://git.drupalcode.org/issue/bibcite_crossref-3388342.git"
            },
            {
                "type": "git",
                "url": "https://github.com/alvar0hurtad0/cache.git"
            },
            {
                "type": "git",
                "url": "https://github.com/dmlb2000/simple-cache-bridge.git"
            }
    

    Add the following to the "require" section:

            "cache/cache": "dev-patch-1 as 1.2",
            "cache/simple-cache-bridge": "dev-master as 1.2.0",
            "drupal/bibcite_crossref": "dev-3388342-drupal-10-version"
    

    Add the following patches:

               "drupal/bibcite_crossref": {
                    "#3388342-25: Fix json_encode call": "https://www.drupal.org/files/issues/2024-04-26/3388342-25.patch"
                },
                "renanbr/crossref-client": {
                  "#3388342-24: Fix bad cache check": "https://patch-diff.githubusercontent.com/raw/renanbr/crossref-client/pull/24.patch"
                }
    

    Hopefully the upstream changes are merged soon, but this let me install everything via composer.

Production build 0.71.5 2024