Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Commit 85de396

Browse files
Try pulling some tricks with Contenta installation and configuration.
1 parent b4e69ff commit 85de396

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

web/sites/default/settings.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@
2323
CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config',
2424
);
2525

26-
// Contenta configuration:
27-
// Ideally, we keep our config export in ../config, but it needs to
28-
// be here at first so that installation will work.
29-
// TODO: Better strategy going forward to support both installation and
30-
// relocated configuration directory.
31-
$config_directories['sync'] = 'profiles/contrib/contenta_jsonapi/config/sync';
26+
// Check to see if we are serving an installer page.
27+
$is_installer_url = (strpos($_SERVER['SCRIPT_NAME'], '/core/install.php') === 0);
28+
if ($is_installer_url && !file_exists($config_directories[CONFIG_SYNC_DIRECTORY] . '/system.site.yml')) {
29+
// Contenta configuration:
30+
// Ideally, we keep our config export in ../config, but it needs to
31+
// be here at first so that installation will work.
32+
// TODO: Better strategy going forward for this.
33+
$config_directories[CONFIG_SYNC_DIRECTORY] = 'profiles/contrib/contenta_jsonapi/config/sync';
34+
}
3235

3336
/**
3437
* If there is a local settings file, then include it
@@ -39,9 +42,6 @@
3942
}
4043

4144
/**
42-
* Always install the 'standard' profile to stop the installer from
43-
* modifying settings.php.
44-
*
45-
* See: tests/installer-features/installer.feature
45+
* We are going to install the contenta_jsonapi profile.
4646
*/
4747
$settings['install_profile'] = 'contenta_jsonapi';

0 commit comments

Comments
 (0)