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?
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | 3388342-drupal_10_version-31.patch | 21.31 KB | byronveale |
| #31 | 3388342-drupal_10_version-31.diff | 20.97 KB | byronveale |
Issue fork bibcite_crossref-3388342
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
Comment #2
danrodI 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.
Comment #3
robcarrThe 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 #3296634: Automated Drupal 10 compatibility fixes 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:
(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).
Comment #4
robcarrHave 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
Comment #5
robcarrProbably 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...
Comment #6
aardwolf commentedhttps://www.drupal.org/project/bibcite_crossref/releases/2.0.x-dev
Comment #7
robcarrHaving 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 inAdd in dependencies
composer require 'drupal/bibcite_crossref:2.0.x-dev@dev' -Wresults in: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.
Comment #8
robcarrI'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
Comment #9
avo webworks commentedI 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.
Comment #10
uberengineer commentedThe 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
Comment #12
uberengineer commentedrenanbr/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
Ready for review/testing
Comment #13
robcarrThanks 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.
Comment #14
avo webworks commentedI've uploaded a patch file for now until the merge request is in place. This way @robcarr can test as well.
Comment #17
hxdef commentedComment #18
avo webworks commentedGreat. 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!!
Comment #19
robcarrI 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.
Comment #20
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":
Comment #21
robcarr@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.Comment #22
aardwolf commentedYou'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.
Comment #23
aardwolf commentedWaiting https://github.com/php-cache/cache/pull/276
Comment #24
uberengineer commentedCreated pull request for renanbr/crossref-client https://github.com/renanbr/crossref-client/pull/24
This resolves the error from #21
This patch can be applied in the interim to resolve
https://patch-diff.githubusercontent.com/raw/renanbr/crossref-client/pul...
When commit is merged the commit hash needs to be removed from the composer requirements for renanbr/crossref-client
Comment #25
uberengineer commentedAlso 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
Comment #26
j_ten_man commentedHere'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):
Add the following to the "require" section:
Add the following patches:
Hopefully the upstream changes are merged soon, but this let me install everything via composer.
Comment #27
tokiHas anyone managed to install the module and especially to create references under Drupal 10 using the DOI?
Several users are in dire need of this procedure, thank you for any additional information on the installation process through Composer and operation of this critical module for Bibcite.
When trying to require the dev version today (with minimum-stability on dev) on Drupal 10.3.5 :
Comment #28
tokiI carefully followed the instructions in comment #26 and launched a composer update -W at the end.
Everything is well installed and I was able to activate Bibcite Crossref under Drupal 10.4.1.
Unfortunately, when I launch a DOI lookup to populate a reference, I get a WSOD and I get the following error:
PHP Fatal error: Declaration of Cache\\Bridge\\SimpleCache\\SimpleCacheBridge::set($key, mixed $value, DateInterval|int|null $ttl = null): bool must be compatible with Psr\\SimpleCache\\CacheInterface::set($key, $value, $ttl = null) in /home/my_website_root/public_html/my_website/vendor/cache/simple-cache-bridge/src/SimpleCacheBridge.php on line 61Comment #29
tokiIf I understood correctly (I am not a pure developer but a humble site builder), the tools necessary for Bibcite CrossRef are not compatible with psr/cache version 3.0.
With the assistance of an AI, I tried to modify the files cited by the error messages on the Apache console of my server.
In the end, I was able to modify 6 files following writing constraints of psr/cache v3.0 and I manage to open the DOI lookup import form on Drupal 10 and import a test reference.
Here are the 6 modified files (essentially absence of types for certain functions, parameters and returns):
See attached files (cache_files_corrected.zip)
If someone could simply look at these changes to get them right, I know AI is probably not the right way to do it but I really need this feature for my clients, so if these modifications can put someone on the right path to finally make this module D10 compatible, I would be really grateful.
Unfortunately the imported data show many problems for the moment, I have many markups everywhere (title, abstract) and the names of contributors are filled with their address too. So if someone can help here to edit the module so it can import data properly from DOI, it would be really great too.
Comment #31
byronveale commentedGreetings,
I am reviving this older issue in order to make the module Drupal 10/11 compatible.
According to Claude Opus 4.6:
Including patch and plain diff files for the convenience of devs who would like to test this…
I also would like to inquire about being a co-maintainer of this module.
Comment #32
byronveale commentedPinging to see if anyone following this would be able to take a look at it…
Comment #33
tokiThank you for your patch, I am not a maintainer of this module but I am a regular user and my customers clearly need this Crossref tool. So a D10 version then D11 later would be really welcome. I will try to test on my side to see if it works on my environment with a fresh install.
Comment #34
tokiIt works fine!
You may try to contact mark_fullmer or bkosborne, they seem to be the active maintainers on Bibcite globally.
Steps to reproduce to test this patch :
Install drupal ^10.6
Install Bibcite module
Add the drupal git repository in composer.json (see comment #26)
Then
composer require cweagans/composer-patchesand add the patch in extra composer.json
Install Bibcite Crossref
Try to populate reference via DOI lookup and it works perfectly.
Comment #35
byronveale commentedThank you for testing!
FWIW, I tested with Drupal 11.3.10, seems to work fine, so updated the title of this issue.
Yes, bkosborne (co-worker) sent me here, so he’s aware.
Paging @adcillc…
Comment #36
byronveale commentedFor anyone else interested in testing this, FYI I found the patch not applying when following toki’s steps above.
So I added this to composer.json, under repositories:
Then added bibcite_crossref:
Which prompted this:
Finally, I also tested this with Drupal 11.2.12, no issues.
Really finally, watch when commenting, the Fastly test wiped out my comment on reload.
YMMV…
Comment #37
bkosborneComment #38
bkosborneLatest MR looks good to me. Tested and confirmed it works as expected.
Comment #39
byronveale commentedMerged in this update, tested 2.0.x-dev successfully with Drupal 11.2.14 and 11.3.14.
Thanks to all…