Allow install profiles to be switched

Created on 8 August 2011, almost 13 years ago
Updated 22 December 2023, 6 months ago

Problem/motivation

In Drupal 6, install profiles were entirely 'run once', there was no runtime code execution at all, so once you'd installed Drupal it didn't really matter which install profile you used. This was fine for sites that just installed 'Drupal' and then built on top of it. It was a pain for distribution maintainers since they weren't able to cleanly run updates etc.

In Drupal 7, install profiles got the ability to implement hooks in .module files and .install, as well as .info support. This makes them nearly but not quite modules.

There are several issues around Drupal 7 install profiles in the queue. While the Drupal 7 change fixed some problems, it fixed some others which are impossible to solve in Drupal 7 cleanly, however we should try to sort it out for Drupal 8.

The main thing I'm concerned with in this issue is that install profiles have become a required/hidden contrib module, and this is entirely enforced by core. This means if you install Drupal 7 with one profile, and it is never updated to Drupal 8, you either have to hack around it manually, or you're stuck.

People are already running into bugs when they upgrade from Drupal 6 sites that used install profiles that aren't being used for D7 - which makes sense since a lot of D6 install profiles were one-offs.

Proposed solution

I'm mixing a few things in here, some might need to be split into sub-tasks:

* Get rid of the custom .profile extension and just use .module
* Add a 'type' key to .info files so we can identify install profiles other than by extension (or if not rely on profiles/$profile/$profile.module as a naming scheme.
* Show the profile in the modules interface like any other (or worst case have a separate install profile admin screen like we do for themes)
* Allow Drupal to work without any install profile in the system - so if you disable/uninstall the profile your site can continue to run normally.

There are some other bits to this but that'll do for now.

UI changes

There will need to be a place to disable install profiles, unless we hide the feature and require drush to do it (that might be OK for a first pass actually).

API changes

This will definitely involve at least some API changes for install profiles themselves.

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated 23 minutes ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

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.

  • πŸ‡©πŸ‡ͺGermany donquixote

    I think install profiles are still a weird concept.

    #6 (Sheldon Rampton, 12 years ago)

    I'm increasingly of the opinion that there is a significant design flaw embedded in the current concept of "installation profiles."

    "Installation" is something that happens once, and only once, when a website is first created. I think it is inherently problematic, therefore, to use installation profiles to both perform initial setup and to provide site configuration after the initial setup has been completed.

    There is also the scenario where a team works on a project without sharing a database dump.
    Perhaps during an early phase of development, or there are other reasons.

    Such teams will currently run into the problem where install from existing config does not work if the profile contains a hook_install(). See πŸ› Allow an install hook in profiles installing from configuration Needs work .

  • πŸ‡©πŸ‡ͺGermany donquixote

    For my taste, after initial installation, the concept of an install profile seems quite useless.

    The main purpose of an install profile is to guide the initial installation, and (what currently doesn't work so well), additional non-configuration setup when installing from existing config.

    An install profile _can_ be a container for modules and themes in a distribution.
    However, I don't really see a benefit from this: It turns a distribution into an island or prison, instead of something you can grow out of.

    I support this issue and the one I linked above, but long term maybe we should rethink this concept.

  • Status changed to Postponed 6 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    @donquixote you should check out the recipes initiative which is trying to do exactly this.

    I think we can postpone this issue on πŸ› Install profile is disabled for lots of different reasons and core doesn't allow for that Fixed - not convinced there's any benefit to switching to a new install profile, if you can uninstall one instead.

Production build 0.69.0 2024