Make it possible to install dependent modules when installing theme

Created on 11 December 2019, over 4 years ago
Updated 7 November 2023, 7 months ago

Problem/Motivation

It became possible to have themes depend on modules in #474684: Allow themes to declare dependencies on modules β†’ . In this implementation, the dependee-modules must be enabled in admin/modules before a module-depending theme can be enabled.
Ideally, it would be possible to enable the dependent modules as part of enabling the theme. This was not part of the initial implementation due to the complexities of permissions and confirmation forms when both themes and modules are being enabled.
A partial implementation was added in an earlier iteration of the patch #474684: Allow themes to declare dependencies on modules β†’ , once it was apparent that additional validation (including experimental modules) was needed, it was decided that this was better addressed in a followup.

Proposed resolution

Determine how to best implement module-enabling validation in both admin/modules and when enabling module-dependent themes.

Then implement that.

Remaining tasks

?

User interface changes

...

API changes

...

Data model changes

...

Release notes snippet

...

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
ExtensionΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
  • DrupalWTF

    Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.

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.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

  • Assigned to DamienMcKenna
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    This is a definite DrupalWTF as theme builders should expect that listing a module as a dependency of their theme would make it work the same as on another module.

    Working on a reroll.

  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Rerolled, hopefully successfully; the only part I'm not 100% about are the changes to core/lib/Drupal/Core/Extension/ThemeInstaller.php, some refactoring had already been done there on another issue.

  • Issue was unassigned.
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Patch #23 was against 9.5.x. This patch is for 10.1.x

  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI
  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    Things have been deprecated in the time that passed since the last working patch β°β°β°β°πŸ’€

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Seems there were some failures.

    Love the idea though as I would make my themes require the components module.

  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    I believe some (maybe all) of the remaining test failures are due to #3215043: Indicate the non-stable statuses in admin/modules page β†’ . This made some nice changes to the module form experience, but will require the logic in this issue to be updated to account for the differences.

  • πŸ‡ΊπŸ‡ΈUnited States Dave Reid Nebraska πŸ‡ΊπŸ‡Έ

    Our install profile has a base theme that requires modules, and we realized because of this issue, our install profile cannot be installed anymore because the installer installs themes before modules. I would say this is a bug more than a feature request at this point.

Production build 0.69.0 2024