Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

Filter by
Sorted by
Tagged with
42
votes
13answers
29k views

How do I remove a configuration object from the active configuration?

I'm writing a custom module for Drupal 8. It defines a field storage configuration object, in a file called modules/mymod/config/install/field.storage.bloom_stem.bs_twitter_ac.yml. The problem is ...
50
votes
7answers
34k views

How can I import the configuration on a different site?

I have this error when I try to import the config of an another site: The staged configuration cannot be imported, because it originates from a different site than this site. You can only ...
80
votes
7answers
8k views

Suggestions for settings.php - Local dev, Development server, Live server

Basically, one of the greatest questions of all time: What are some ways you're using settings.php in your development/staging workflow? Right now, I have my settings.php file set up like the ...
33
votes
6answers
11k views

How do I update the configuration of a module?

I'm building a custom module in Drupal 8. It includes some YAML config files. As I develop I need to change and add to the config, e.g. to add another field onto my custom entity. At present the ...
16
votes
7answers
8k views

Exclude configuration from import/export

I thought this was a simple use case of the new Configuration management system, but I haven't had any luck finding out how to solve this: Problem I want to store configuration in git and use drush ...
6
votes
2answers
4k views

How to override configuration from a file?

I have been playing a lot lately with an import configuration to Drupal 8. And I notice that all documentation show you how to edit value per value instead of overriding the entire config file. You ...
4
votes
2answers
520 views

Development with git branches/ gitflow and new modules

I wonder if somebody found a solution for the following issue related to Drupal 8 development with Git branches: You work on a new feature in a local feature branch for that you activate a ...
2
votes
1answer
571 views

How can I exclude API keys, passwords, and so on from configuration management?

I am using Drupal 8 and drush cex to commit my configuration to my repository. However, I want to keep passwords and API keys out of the repository. How do I do that? (selectively exclude sensitive ...
26
votes
9answers
4k views

How to prevent Devel module to be installed on production environments

Using the new Drupal 8 Configuration manager, how can I prevent it from installing the Devel module on certain environments? As far as I know, installing it on my local means the next time I export ...
21
votes
3answers
14k views

How do I set a variable in the configuration file setting.php and use it from code?

How do I set a variable in the configuration file setting.php and use it from code?
10
votes
1answer
4k views

How to remove mymodule configurations on uninstall [duplicate]

I have created a custom module and created a yml file to create a menu system.menu.custom_menu.yml id: custom_menu label: 'Custom menu' description: 'Custom menu.' langcode: en locked: true ...
6
votes
2answers
2k views

Is there a module for tracking changes to a Drupal site's configuration? [closed]

I want to create a simple system for tracking changes to my Drupal configurations and knowing which modules are used by some configuration settings is crucial, but will be happy to use an existing one ...
1
vote
1answer
129 views

Export Paragraph bundle with Drupal Console

I know there is a command to export a content type config:export:content:type But is there a way to do this for a Paragraph bundle? Something like this isn't working config:export:paragraph:type
13
votes
2answers
3k views

What are cloned sites in Drupal 8?

When trying to export my site configurations from one Drupal 8 site to other I keep getting the following error The staged configuration cannot be imported, because it originates from a different ...
4
votes
5answers
1k views

Block error on CMI

I have two identical sites on Drupal 8 (A and B), on (A) I created a custom block(block/add), and then I export the configuration(drush config-export) and import this config on (B) (drush config-...
3
votes
3answers
950 views

How do I export my site structure?

Since Drupal 8 is days away from release, I've started experimenting with rebuilding my personal site on it. The one feature I am really looking forward to is configuration management in code. ...
1
vote
2answers
482 views

Adding script conditionally

In the module I am developing I need to add script which require jQuery.The will be added depending on configuration settings. Hence I am using template_preprocess_module(&$variables) where I am ...
21
votes
3answers
12k views

Import a single yml configuration file

Is it possible to import one single yml configuration file by specifying its path? Or a group of yml files contained in a specific module?
10
votes
1answer
2k views

What order should configuration import and module updates be run?

Since the schema version of modules is stored in the key-value storage, it is unique to each site and is not synced through configuration management. That makes sense, since updates may need to make ...
8
votes
2answers
392 views

Why is settings.php in the web folder?

In the default installation, settings.php is located at sites/default/. There are no recommendations in the official Drupal website about changing the location of this file. Doesn't it pose a ...
0
votes
2answers
3k views

How to use different domains for multilingual sites and keep users logged in?

I have a site that is in French and English. I am able to successfully setup so that users can switch back and forth between the two domains to view either language, however I cannot seem to keep ...
9
votes
4answers
6k views

Export menu configuration [closed]

Looking for a way to export menu configuration. The Configuration management system will export the menu itself, but not the menu links configuration. I am looking for a way to put one of those mega ...
2
votes
2answers
3k views

How to change default language for configuration entities

I made a mistake during development of my Drupal 8 site. Some time ago I changed the default language (to german) - but I continued to create the configuration entities (like fields and so on) in ...
0
votes
1answer
885 views

How to override “active configuration” when the theme is installing?

I have a theme that imports configuration when is installed. The problem is when the configuration is already there and is active. Unable to install MYTHEME, field.field.user.user.user_picture, ...
6
votes
3answers
1k views

How to add the configuration changes from a website to another website?

This is what I'm trying to do: I have a website A where I make configuration changes and add other stuff. Now I create a website B. I would like to add the configuration changes from website A to ...
1
vote
2answers
1k views

Programmatically changing the global site name?

I'm making a multi-site setup using the same install and the same database, basing it off domains. I'm trying to programmatically alter the site_name variable so that it displays a different site name ...
0
votes
1answer
691 views

How does Acquia Dev Desktop create the connection to the database?

I am using Acquia Dev Desktop 2 on my windows 10 PC in order to develop Drupal 8 websites. As far as I know, every Drupal website requires a connection between its files and the database which is ...
-1
votes
1answer
55 views

Organizing config for use with a module

I've recently learned about adding a config/optional directory to a module to provide config items that will be imported upon enabling the module if there are no conflicts. Is there an easier way to ...
15
votes
3answers
327 views

How do I deploy/manage similar sites from an unique profile, without dumps?

I do not like the "cloning website" solutions which implies dumping a database and importing this dump in another environment. This does not look like a real world way of deploying several instances ...
7
votes
3answers
9k views

Site UUID in source storage does not match the target storage

When I run drush cim -y on my staging instance of my site I get the following error: Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. in Drupal\...
3
votes
1answer
661 views

What are the alternatives to Features module in Drupal 8 [closed]

I am trying to export configurations from one Drupal site to other. This is not a one time operation, I will need to do this multiple times and Single Import, Simple Export is not an option as there ...
9
votes
4answers
23k views

How do I set variables for variable_get()?

I am trying to understand variable_get(). I read so far that you can set variables in the settings.php using the $conf array and retrieve them later in code by using variable_get(). I have read that ...
7
votes
0answers
1k views

How do I translate theme settings?

How do you translate custom theme settings in Drupal 8? I use hook_form_system_theme_settings_alter to add custom settings to a theme. One setting is the text string (e.g. 'Menu') to display beside ...
11
votes
2answers
5k views

Exporting fields for content type

The configuration export feature of Drupal 8 would seem to be a very useful feature. However, I'm not sure I completely understand how it works. For example, if I do a single export, choose "Content ...
8
votes
2answers
8k views

Drupal 8 variable_get

I have some code in Drupal 7 what are using variable_get. Now I would like to write the code in Drupal 8. So I was reading this but its didn't help me a lot. How to write this code in Drupal 8 from ...
6
votes
1answer
1k views

How to disable modules using config split?

I have created different split for each environement (local, dev, test, prod) using the Configuration Split module. How can manage modules (enable/disable) in each environment? Should I keep core....
5
votes
1answer
2k views

YML For Enabling a Contrib Module

I am adding a contrib module to a project and I would like the module enabling to happen automatically on deployment. My deployment script pulls the code and runs a config update via drush config-...
3
votes
4answers
7k views

Remove the strict warnings from being shown

I have a site using Drupal 6; after upgrading PHP to 5.4 , some strict warning appear. I set error_reporoting in settings.php with the following code, but I still see the E_STRICT warnings. ...
2
votes
1answer
492 views

Copy installed modules and configuration to new installation

I have a Drupal 8 application with mysql as database. I installed bunch of third part modules such as domain, search_api, pdf etc... Most I installed using composer and a very few using "Install ...
2
votes
2answers
2k views

Is there a way with drush or console to delete all active config with a certain prefix?

I'm currently trying to migrate a site with drush migrate-upgrade --configure-only ... and copying the export migrate_plus.migration_*.yml into a custom module for tweaking. Now I want to enable that ...
10
votes
2answers
797 views

Best way to delete all variables when uninstalling module

I'm writing a module that writes several variables (three, four variables for every content type, and other). Which method should I use to delete them on hook_uninstall? Is it safe to perform a ...
9
votes
2answers
5k views

Configuration export/import doesn't work

I did a drush config-export staging on a local version of my site then a drush config-import staging on the server. It imported all the taxonomy vocabulary but no terms. I also tried it via the UI (...
6
votes
2answers
837 views

Disabling module with config sync and removing with composer

I have an issue disabling modules, I've searched but cannot find something useful: - Developer A disable module and via composer remove it - I pull his changes so i run composer install that remove ...
6
votes
2answers
1k views

Module uninstall dependencies

I'v got a question regarding dependencies & configuration. I created a module providing a content type, field type, widget & formatter. While wanting to uninstall the module, I get the ...
6
votes
1answer
929 views

Are configurations written and read directly to/from .yaml files or still to the database?

Background Drupal 7 and previous versions have attracted criticism for Drupal web site admin configuration being stored in the MySQL database, the criticism being that being in a database means that ...
4
votes
2answers
3k views

How can I programatically change the (D8 core) workflow state of an entity with Content Moderation?

I'm using Drupal 8.4-rc2. When you enable the Workflow and Content Moderation modules, you automatically get the Editorial Workflow as a demonstration. The states are as follows: Archived Draft ...
2
votes
3answers
5k views

PDO exception error [database].semaphore doesnot exist [duplicate]

I created a website in drupal 7, tested it in my localhost and works good. Now, I want to host the site in our Main server. So, I uploaded the site directory to the server and created a corresponding ...
2
votes
2answers
2k views

The best way to store drupal Configuration

I know three options to store the configurations: Use the UI and store the values into the variable table. Also you can store them in settings.php and use the $conf[''] array to store the ...
1
vote
2answers
1k views

All links point to the old site after migration [duplicate]

I migrated a Drupal 7 site from 1 server to another. Let's call the old site URL http://oldsite.com and the new site url http://newsite.com. I have copied over the code base and the database. The site ...
1
vote
1answer
63 views

Config split ignore dependencies

I'm using the config_split module to split configuration to an installation profile, that I use in multiple Drupal sites. I have 2 sites using the same installation profile, both using the same ...