Composer errors using Project Browser on Hostarmada

Created on 5 September 2025, about 1 month ago

Problem/Motivation

Testing Drupal CMS on Hostarmada, I was able to get around the timeout using the workaround in πŸ› Package Manager tasks can exceed wait_timeout on cheap hosting Active , but got another error trying to add a module:
SandboxEventException: The new package drupal/drupal_cms_content_type_base will be installed in the directory /recipes/drupal_cms_content_type_base, which already exists but is not managed by Composer. The new package drupal/drupal_cms_google_analytics will be installed in the directory /recipes/drupal_cms_google_analytics, which already exists but is not managed by Composer. The new package drupal/drupal_cms_image will be installed in the directory /recipes/drupal_cms_image, which already exists but is not managed by Composer. The new package drupal/drupal_cms_page will be installed in the directory /recipes/drupal_cms_page, which already exists but is not managed by Composer. The new package drupal/drupal_cms_privacy_basic will be installed in the directory /recipes/drupal_cms_privacy_basic, which already exists but is not managed by Composer.

Steps to reproduce

Try to use Project Browser to install a module on Hostarmada.

Installed version of Drupal CMS is 1.2.2 as that's what Softaculous offers currently.

πŸ› Bug report
Status

Active

Component

Infrastructure

Created by

πŸ‡¦πŸ‡ΊAustralia pameeela

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

Merge Requests

Comments & Activities

  • Issue created by @pameeela
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    This is coming squarely from Package Manager: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/packa...

    When this validator was written, we had no concept of recipes or recipe unpacking. This is a clear bug where Package Manager needs to be altered. A few ideas:

    • Remove the validator entirely
    • Convert the error to a warning
    • Don't do the validation for packages that are recipes, since we know they could be unpacked

    In the meantime, Drupal CMS's helper module can and should work around it by disabling the validator (and, for that matter, by also implementing the wait_timeout workaround).

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    There is one thing I'm wondering as I look at this -- I wonder why adding a module somehow decided to bring in all of those recipes, which are clearly unpacked (and that's why they're not Composer-managed). But why would they get added anew?

    Can you provide exact steps to reproduce this locally? After setting up Drupal CMS, what module did you try to add and how did you go about it?

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    Just got the same on HostGator.

    Steps:

    1. Go to Project Browser
    2. Try to install Views Bulk Operations (one of the first modules that isn't already installed)

    Have not tried locally.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    Uploaded composer.json and composer.lock from HostGator.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    With Pam's help I managed to trace this. We has found the problem and they is us.

    The problem is that Drupal CMS 1.x still requires the drupal/drupal_cms_analytics metapackage, which is a metapackage and therefore untouched by the recipe unpacker. The problem with that, is that this metapackage...requires recipes! So this ends up reintroducing in the sandbox what the recipe unpacker has already removed from the live code base, triggering the Package Manager validator -- which is absolutely doing the right thing here.

    The correct solution, in this case, is to get rid of drupal/drupal_cms_analytics. For context, this package was created before 1.0, when it became apparent that we wanted to scope the analytics recipe more tightly to just Google Analytics. Due to a timing snafu, it was released with this wrong, generalized name (and might have even gone to beta with that name -- I don't recall exactly). We couldn't rename it, having already published it, so we did the next best thing, which is publish the drupal/drupal_cms_google_analytics recipe alongside it, and make drupal/drupal_cms_analytics a metapackage containing it and, presumably at the time, any future analytics recipes.

    Welp, I think it's clear now that the existence of that package was a blunder on our part. Would probably have been better for drupal/drupal_cms_google_analytics to replace drupal/drupal_cms_analytics (using the replace key in composer.json), but you know what they say about hindsight.

    So, my plan: in another issue:

    • Remove drupal/drupal_cms_analytics from our subtree split and from the project template's composer.json, replacing it with drupal/drupal_cms_google_analytics. This will happen in both the 2.x and 1.2.x branches.
    • Alter drupal_cms_analytics to allow any version of drupal_cms_google_analytics.
    • Mark the drupal/drupal_cms_analytics project as obsolete. It will never receive another release.
    • Roll a new release of drupal_cms_analytics and drupal/cms which contains this change.

    Here's what I think the effect will be:

    • New sites: they'll never know that drupal_cms_analytics ever existed. They'll get drupal_cms_google_analytics and unpack it happily.
    • Existing sites: although the continued presence of the metapackage is not harmful to the operation of the Drupal site, it could cause trouble for Composer (as we've seen in this issue). We will have a change record which recommends unpacking all recipes (if it hasn't been done already) and removing the metapackage, with instructions on how to do that.
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Merged into 2.x and cherry-picked to 1.2.x.

  • Now that this issue is closed, please review the contribution record.

    As a contributor, attribute any organization helped you, or if you volunteered your own time.

    Maintainers, please credit people who helped resolve this issue.

Production build 0.71.5 2024