Confusion between "Use existing configuration" vs install profile

Created on 5 April 2024, 7 months ago

Problem/Motivation

There's a confusion on how the site installation should work when using an installation profile and a fully functioning exported configuration.

Scenario 1:
* Installation profile with a "config/sync" directory containing the fully working site config.
* The following in settings.php: $settings['config_sync_directory'] = 'profiles/myinstaller/config/sync';

When the installer is opened, two options are presented:
* The name of the installation profile.
* An option that says "Use existing configuration".

Both result in the same results - the site is installed as expected.

Issue 1: there should only be one option shown.

Scenario 2:
* Installation profile with a "config/install" directory containing the fully working site config.
* The following in settings.php: $settings['config_sync_directory'] = 'profiles/myinstaller/config/install';

When the installer is opened, one option is presented:
* The name of the installation profile.

The install fails immediately with this error:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.sessions' doesn't exist: SELECT "session" FROM "sessions" WHERE "sid" = :sid LIMIT 0, 1; Array ( [:sid] => o9PS8MFItCuIS8Pk7zKJ0Z4g7nis34xEFy7pO65WOl4 ) in Drupal\Core\Session\SessionHandler->read() (line 62 of core/lib/Drupal/Core/Session/SessionHandler.php).

Scenario 3:
* Installation profile with no "config" directory.
* Site configuration stored in "config/sync".
* The following in settings.php: $settings['config_sync_directory'] = 'config/sync';

When the installer is opened, one option is presented:
* The name of the installation profile.

The install fails immediately with this error:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.sessions' doesn't exist: SELECT "session" FROM "sessions" WHERE "sid" = :sid LIMIT 0, 1; Array ( [:sid] => o9PS8MFItCuIS8Pk7zKJ0Z4g7nis34xEFy7pO65WOl4 ) in Drupal\Core\Session\SessionHandler->read() (line 62 of core/lib/Drupal/Core/Session/SessionHandler.php).

Steps to reproduce

Have an install profile which contains a exported configuration.

Proposed resolution

When running a site installation:
* If $settings['config_sync_directory'] is defined and points to a valid installation path, that config may be used to run the installation.
* If $settings['config_sync_directory'] is not defined the installation profile is used as normal and the option to use the exported configuration is not presented on the installer page.

Remaining tasks

Work out the correct approach to doing this.

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
InstallΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

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

Comments & Activities

Production build 0.71.5 2024