Install profile is disabled for lots of different reasons and core doesn't allow for that

Created on 27 May 2011, about 13 years ago
Updated 13 April 2024, 2 months ago

Issue summary:

There are multiple issues with install profiles, both within Drupal 7 and on upgraded Drupal 6 sites, these all end up with the same symptom: "Undefined index: distribution_name" due to system_requirements().

Previous solution discussion

There are a couple of ways to fix this, and they may be contradictory.

sun's patch started work on automatically ensuring the install profile is enabled every time _system_rebuild_module_data() is called. This would fix install profiles that have been disabled by drush 3 or update.php

However, there is no straight bug fix solution for the situation where a site is no longer using an install profile. For this we could either start allowing people to explicitly disable an install profile, or just make the system tolerant when none is found in the system (for example setting the site to use the 'minimal' profile which should never have any runtime code added to it).

To minimize the number of new comments asking for it, here's a work-around for current Drupal 7 users: You need to enable the profile used to install Drupal by updating the system table. For example: UPDATE system SET status=1 WHERE name='standard'; will enable the Standard profile. If you don't know which profile was used, just use 'standard'.

Proposed solution

Allow install profiles to be uninstalled if the site does not depend on any module in the profile directory. The MR adds an new uninstall validator (Drupal\Core\Extension\InstallProfileUninstallValidator) to ensure this is the case.

Remaining tasks

None

User interface changes

The install profile can be uninstalled if the site has uninstalled any modules it provides.

API changes

\Drupal::installProfile() can return FALSE as well as NULL and a string value. FALSE means the site has no install profile. This differs from NULL which means the site is yet to be installed.

Data model changes

The configuration key core.extension:profile might not exist.

Release notes snippet

A site's install profile can now be uninstalled if the site has uninstalled any modules it provides and no other modules are dependent on it.

πŸ› Bug report
Status

Fixed

Version

10.3 ✨

Component
InstallΒ  β†’

Last updated about 12 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States cpelham

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

Merge Requests

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