When installing a profile module it incorrectly gets added to the module list with type module

Created on 17 October 2015, over 8 years ago
Updated 24 January 2023, over 1 year ago

Problem/Motivation

Profiles and modules are pretty interchangeable in regards to how they are installed and handled through the ModuleInstaller and the ModuleHandler. When a profile is installed as part of an installation during install_install_profile() it uses the ModuleInstaller which creates an Extension object with a type of module and adds it to the module handler. This normally does not matter because the module handler is re-instantiated during each request so after the request that installs the profile it is correctly identified as profile. However, during a Drush install using the https://www.drupal.org/project/config_installer this is not the case. Because there is no request so it is always using exactly the same ModuleHandler and the profile is identified as a module up until the Drush command completes.

Proposed resolution

Add an $is_profile parameter to ModuleInstaller::install()

Remaining tasks



User interface changes

None

API changes

ModuleInstaller::install() has a new $is_profile parameter

Data model changes

None

🐛 Bug report
Status

Needs review

Version

10.1

Component
Base 

Last updated 4 minutes ago

Created by

🇬🇧United Kingdom alexpott 🇪🇺🌍

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.

Production build 0.69.0 2024