Failure to install CivicTheme with Drupal 11

Created on 26 September 2024, 3 months ago
Updated 29 September 2024, 3 months ago

Hi,

I am building a demo website on my computer's localhost. I am new to Drupal, however I have notions of various coding languages.

My setup is: Drupal 11, MariaDB v11.5.2, nodejs v20.17.0, Composer v2.7.9 and PHP v8.3.12

I managed to get Drupal running and I can access my website's dashboard, settings, etc. I now wish to install CivicTheme's latest version. However, when I run the following command: composer require drupal/civictheme, the terminal returns the following message,

./composer.json has been updated
Running composer update drupal/civictheme
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/civictheme[1.8.0, ..., 1.8.1] require drupal/layout_builder_restrictions ^2.19 -> satisfiable by drupal/layout_builder_restrictions[2.19.0, 2.20.0].
    - drupal/civictheme[1.4.2, ..., 1.5.1] require drupal/core ^9 || ^10 -> found drupal/core[9.0.0, ..., 9.5.11, 10.0.0, ..., 10.3.5] but the package is fixed to 11.0.4 (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/civictheme[1.6.0, ..., 1.7.1] require drupal/core ^10 -> found drupal/core[10.0.0, ..., 10.3.5] but the package is fixed to 11.0.4 (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/layout_builder_restrictions[2.17.0, ..., 2.20.0] require drupal/core ^9.3 || ^10 -> found drupal/core[9.3.0, ..., 9.5.11, 10.0.0, ..., 10.3.5] but the package is fixed to 11.0.4 (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.
    - Root composer.json requires drupal/civictheme * -> satisfiable by drupal/civictheme[1.4.2, ..., 1.8.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require drupal/civictheme:*" to figure out if any version is installable, or "composer require drupal/civictheme:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I tried running the command with --with-all-dependencies, eventually I feel like I got closer to the solution with

c:\Windows\System32\drupal>composer require drupal/civictheme:^1.8.1 --with-all-dependencies -W
./composer.json has been updated
Running composer update drupal/civictheme --with-all-dependencies
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/layout_builder_restrictions[2.19.0, ..., 2.20.0] require drupal/core ^9.3 || ^10 -> found drupal/core[9.3.0, ..., 9.5.11, 10.0.0, ..., 10.3.5] but these were not loaded, likely because it conflicts with another require.
    - drupal/civictheme 1.8.1 requires drupal/layout_builder_restrictions ^2.19 -> satisfiable by drupal/layout_builder_restrictions[2.19.0, 2.20.0].
    - Root composer.json requires drupal/civictheme 1.8.1 -> satisfiable by drupal/civictheme[1.8.1].

Now I don't understand what "another require" could be or how to fix it, but I do understand that there seems to be a compatibility issue.

Can you please help me figure it out?

Apologies for any wrong formatting, I am not familiar with posting on technical forums either.

Sincerely,
Sarah.

💬 Support request
Status

Active

Version

1.8

Component

Code

Created by

🇫🇷France troussolo

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Confirming as a Drupal newbie.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    drupal/civictheme 1.8.1 requires either drupal/layout_builder_restrictions 2.19.0 or drupal/layout_builder_restrictions 2.20.0, but those require Drupal 9 or Drupal 10. You cannot install drupal/layout_builder_restrictions 2.19.0 nor drupal/layout_builder_restrictions 2.20.0 on Drupal 11.

  • First commit to issue fork.
  • 🇦🇺Australia KelvinWong

    Only layout_builder_restrictions 3.x supports Drupal 11. I've created a patch for that.

  • 🇦🇺Australia KelvinWong

    Looks like layout_builder_restrictions is not the only module with the problem. There's also these modules, the version of the module is not compatible with Drupal 11.

    "drupal/field_group": "^3.4",
    "drupal/focal_point": "^2.0",
    "drupal/layout_builder_restrictions": "^2.19",
    "drupal/linkit": "^6.1",
    "drupal/menu_block": "^1.10",
    "drupal/paragraphs": "^1.16",
    "drupal/pathauto": "^1.12",
    "drupal/redirect": "^1.9",
    "drupal/simple_sitemap": "^4.1",
    "drupal/webform": "^6.2"

    The Drupal 11 compatible version of field_group and linkit are still in alpha, and webform doesn't have D11 compatible version yet.

    Perhaps the CivicTheme cannot be installed in Drupal 11 at this stage until other modules are D11 ready.

  • @richardgaunt can you please read through this one. Thanks.

Production build 0.71.5 2024