Everyone seems very excited with new configuration management tools provided by drupal 8. It just packages all (or single) site settings and you can import it to your other environments. But there are few glitches those can give developers hard time. And I am one of those developer. Here are few issues, I noticed while working with other developers and using configuration management.
1. Unable to install the standard module since it does not exist.
First of all, I had no idea what’s going on here. Later I figured out that, one of the developer installed fresh drupal with standard profile and later changed the site hash to match the old installation. Now as configuration is looking for standard extension which does not exist on our site and configuration import fails with message ‘unable to install the standard….’. There are two ways to fix this issue:
- Make backup of you configuration files. Copy to your imported configuration files to your config folder and edit ‘core.extension.yml’. Remove the line standard: xxxx under module. Now, you can sync the config.
- Edit settings.php file, and paste:
$settings['install_profile'] = 'standard';
I would recommend to try first method and second if first does not work.
2. Configuration source control issue
When you install drupal, you will get weird directories. If you want to have common folder for configuration sync, you can define the directory where you want to have all config files. I personally prefer to use ‘sites/xxxx/sync’ folder. To use it as sync folder, you need to make add line of setting in settings.php.
$config_directories['active'] = 'sites/xxxx/sync'; //xxxx is your site folder, default in most of the cases
3. Configuration Management vs features
As you have noticed, features module is still there even drupal 8 is armed with configuration management. Features team has their own explanation on why you still need feature. As a rule of thumb, if you want to package certain collection of feature which you can use in other sites easily, you need features module. For example, If you want to use all articles related configurations in different site, you need feature in this case. You can use configuration management too but that will too much work. Using feature you can easily package them and import them in new site. You can learn details of configuration management vs features. https://www.youtube.com/watch?v=a6QLTjSFVhs and http://www.slideshare.net/nuvoleweb/2015-04devdaysmontpellier