Problem/Motivation

In July 2023, Bibliography & Citation updated to 3.0@beta which is compatible with Drupal 10.0. The composer.json looks for 1.0 or 2.0 bibcite and will not install. It also looks for Drupal 9.0.

Steps to reproduce

Attempting to install the pubmed module using, composer require -W 'drupal/bibcite_pubmed:^2.0@alpha' or composer require 'drupal/bibcite_pubmed:^2.0@alpha' fails with the error message:

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

Problem 1
- Root composer.json requires drupal/bibcite_pubmed ^2.0@alpha -> satisfiable by drupal/bibcite_pubmed[2.0.0-alpha1].
- drupal/bibcite_pubmed 2.0.0-alpha1 requires drupal/bibcite ^1.0|^2.0 -> found drupal/bibcite[2.0.0-beta1, 2.0.0-beta2, 2.0.0-beta3] but it conflicts with your root composer.json require (^3.0@beta).

Proposed resolution

Change installation to accept ^3.0 and Drupal 10.0

CommentFileSizeAuthor
#2 bibcite_pubmed-3384680-1.patch326 bytesmohd sahzad
Command icon 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

spenecer created an issue. See original summary.

mohd sahzad’s picture

StatusFileSize
new326 bytes

i have fixed this issue Not compatible with Drupal 10 and bibcite3.0

spenecer’s picture

If the bibcite_pubmed is enabled after using this patch, then the website throws a 500 Internal server error for every page. No pages resolve and are blank.

mohd sahzad’s picture

Assigned: Unassigned » mohd sahzad
mohd sahzad’s picture

Assigned: mohd sahzad » Unassigned
mohd sahzad’s picture

I think bibcite3.0 version not available, that's why got this error: website throws a 500 Internal server error for every page. No pages resolve and are blank.

spenecer’s picture

I think the problem is that this module is not compatible with Drupal 10. It isn't just a problem that can be solved by changing the composer install requirements.

bkosborne made their first commit to this issue’s fork.

bkosborne’s picture

Title: Not compatible with Drupal 10 and bibcite3.0 » Not compatible with Drupal 10 and bibcite 3.0
Priority: Normal » Critical
Status: Active » Needs review

I created a merge request which adds compatibility with Drupal 10 and drops compatibility with Drupal 9, just like the Bibcite 3.0.x branch. I don't think it's possible (or maybe not practical/worth it) to support both versions due to a class method we overriding having different signatures in each major Drupal version.

It's likely that even with this patch, users won't be able to update to Bibcite 3.x because this module currently declares support only for Bibcite 1.x and 2.x via its composer.json file. Even though this patch addresses that issue, composer doesn't look at the patched version of composer.json when determining the dependency tree.

A workaround for this is to masquerade bibcite 3.x as 2.x in your project's composer.json file:

"drupal/bibcite": "3.0.0-beta3 as 2.0.0-beta3",

This will install the 3.0.0-beta3, but it will treat it as if it were version 2.0.0-beta3 for dependency resolution.

Of course the best action here is to commit this merge request, ideally as a new major version.

bkosborne’s picture

Hiding patch file from previous work to avoid confusion

  • bkosborne authored 403084c5 on 2.0.x
    Issue #3384680: Not compatible with Drupal 10 and bibcite 3.0
    

hxdef’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.