Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

27
votes
9answers
3k 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 ...
1
vote
1answer
387 views

Can I create an “unlimited” values variable?

I'm trying to create an exclude list of sorts that is configurable via the variable admin interface. I have created lots of single value variables, but never a variable as an array where through the ...
1
vote
1answer
18 views

Create config object with array containing key-value pairs

We have a custom module, mymodule, that we want to use to create a config object for so that it can contain an array of key-value pairs. We need to be able to click button Add More on the form that ...
0
votes
0answers
37 views

Understand how files in Drupal module are connected? [closed]

I am aware that this is a question that has no direct answer but I am still very new to Drupal development and I really do hope that someone will take some time and give me and idea on how are Drupal ...
1
vote
1answer
29 views

Is there any “block_user” module?

After moving my sites to the new server, and some updates in the mean time. I have found one of the sites displaying the "The following module is missing from the file system: block_user bootstrap....
3
votes
1answer
243 views

How to access variables in a fieldset with variable_get

function bi_mx_enhancement_form($form, &$form_state) { $form['bi_mx_enhancement_government_ws'] = [ '#type' => 'fieldset', '#title' => t('Government Web Service Settings')...
0
votes
0answers
16 views

Configuration translate Form Access Denied

This questions has repeat several times, but I face similar issues. Here are configuration yml information webform_protected_downloads.configsettings.yml token_text: 'test' langcode: en ...
3
votes
2answers
436 views

Overriding permissions selectively via settings.php/settings.local.php

The use case is a development module that you would only have installed on a local environment. My thought was to use $config in settings.php to do this: $config['user.role.anonymous']['permissions']...
0
votes
0answers
24 views

how do I import a specific configuration file? [duplicate]

Is it possible to import a specific configuration file, in Drupal 8, instead of importing the full configuration? If it is possible, how can I achieve it?
0
votes
0answers
21 views

How do you add a field to a node type form?

I would like to add a boolean field to all node type forms and save it's value in config. I found this tutorial, but the code formatting is really bad. http://www.jaypan.com/tutorial/drupal-8-...
2
votes
1answer
560 views

TypeError on “drush config-export”

I've been receiving the following error message when trying to do a drush config-export command. However, I am able to successfully do the configuration export from the Drupal admin page (admin/config/...
0
votes
1answer
14 views

Vague error message on config import: Config x depends on x that will not exist after import

I don't understand what is missing. It's just a simple blogpost content type that I created before I reset the db and tried to re-import it. All the modules requires are enabled and I did try to clear ...
0
votes
0answers
29 views

What If I Need Conditional/Overriding (synchronized) .yml Config Install With a Custom Module?

With D8, the appropriate method for adding fields during install with a custom module is with the config system and .yml files in a config/install directory. I have a module for user theming I like ...
0
votes
1answer
20 views

How to resolve error Unable to install the responsive_tables_filter module since it does not exist

I am getting an error when importing the configuration from our development branch. When running. drush cim staging. The error is. The import failed due to the following reasons: Unable to install ...
0
votes
1answer
44 views

drush cim creates and immediately deletes field

Importing the following yml fails. With UUID it wants to be deleted. After removing the UUID it fails with field type doesn't exist. Any ideas? Is there some kind of order that might make the import ...
0
votes
1answer
21 views

Config entity schema to save checkboxes element

I have created a Config Entity, one of the values it stores is the results from a set of checkboxes. This is the element in the form $form['choices'] = [ '#type' => 'checkboxes', '#title' =>...
2
votes
1answer
54 views

What is the deal with config collections?

When manipulating configuration yaml files in config/sync, I note that if you put files in subdirectories, and run drush config:import, the files in those subdirectories are denoted as belonging to a '...
0
votes
1answer
31 views

How do I recreate the system.site configuration element?

For some reason system.site, system.performance and system.date config values have been deleted from our site. I have the original configuration files, but when attempting to import those using ...
-2
votes
0answers
21 views

Attempt to create a field body that does not exist on entity type node - Drupal 8.6.7 [duplicate]

I recently started getting this error on enabling any module or going to content type manage field configuration.. This was not an issue before. It is fairly new site with few content types. ...
2
votes
1answer
2k views

Attempt to create a field body that does not exist on entity type node

I am getting the following error: Drupal\Core\Field\FieldException: Attempt to create a field body that does not exist on entity type node. in Drupal\field\Entity\FieldConfig->...
0
votes
1answer
30 views

Get out of maintenance mode using database query (without using drush or admin area)

I understand there are very many stackoverflow questions on this very topic. How can get my site out of maintenance mode? for example. However I've never seen one that explains how to turn off ...
0
votes
1answer
544 views

Config import constantly showing configs to import

Recently after doing a config import via drush (drush cim sync), the config files don't seem to import properly, as the files are listed after a supposed successful import. (and doing a cex sync shows ...
1
vote
1answer
419 views

Cannot activate parameter cors.config

I am using the RESTful Web Services that is included in core of Drupal 8.2.7. I need to activate CORS to be able to call the API from another domain. I put this configuration in this file: "core/lib/...
0
votes
1answer
27 views

Link field is removing query parameters

We have an Article that a link field, field_link. When we create a new page of type Article, we set the link field to have a URL of www.example.com/somepath?someid=123345 and label of View. When the ...
1
vote
1answer
69 views

Image styles not generated during config import

Situation: Drupal 8.6.9 running DrupalVM with Ubuntu 16.04, Apache 2.4.18, Php 7.1.26 with default settings except for the location of the drupal site. I am trying to do a migration of a Drupal 7 ...
0
votes
0answers
20 views

Custom module - views config dependencies

I have created a module which having two submodules. submodule-1 submodule-2 Within submodule-1 I am defining multiple Views fields and filters based on a custom entity type. Within submodule-2 I ...
30
votes
6answers
9k 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 ...
4
votes
1answer
541 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....
43
votes
6answers
25k 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 ...
-4
votes
2answers
51 views

Is there a single Drush and or Drupal console command to export and import all configurations?

Normally I goto Config Sync then export all > save config tar.gz > import. Can this be achieved with one command?
13
votes
3answers
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 ...
0
votes
1answer
690 views

How do I create a configuration sync folder?

I've inherited a Drupal 8 site but it has no config_HASH folder with it which means that the majority of admin paths throw an exception. How do I generate a new configuration folder based on the ...
0
votes
1answer
577 views

All instances of block are not getting removed

This question is a continuation of this Block in Drupal 8, The second problem I am facing is that suppose I select block made for comment section and place it under Sidebar second section and ...
-1
votes
1answer
11 views

Is it possible to set a role specific value for “allow_insecure_uploads?”

I want to override the value for "allow_insecure_uploads" which is in system.file config, but only for specific roles. Am I going to need to do this in a module / does one already exist?
-2
votes
1answer
48 views

Should configuration synchronization be used only between cloned sites?

Can it be used to get configuration from one site to another site which is not a clone. eg: SiteX is installed using composer create-project drupal-composer/drupal-project:8.x-dev SiteX and ...
0
votes
1answer
39 views

How to check for differences in config

Is there any way to check for differences with config in Drush? I checked the list of drush 8 config commands and I couldn't find anything. The reason I need this is that I have a site that runs ...
0
votes
1answer
63 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 ...
0
votes
1answer
56 views

How do I export and import content types (including fields) between environments?

I've been trying to find a smart way of exporting content type and all its fields from one installation of Drupal to another. The core "Configuration synchronization" export only export the content ...
0
votes
1answer
31 views

Grant permission to current user at runtime in specific environment

Many Drupal contrib modules have inverse "feature flag" implementations vis-a-vis a killswitch variable added to settings.local.php to disable a feature: // Killswitch setting. $settings['...
4
votes
1answer
978 views

Configuration changes that will not import?

I have some configuration that will not import. If I run drush config-import --preview I see the changes to be imported; I hit 'y' to import. When I run the same command, the changes are still there? ...
0
votes
0answers
15 views

Proper Schema file for integer and select

We have a custom module, mymodule that has an admin form where it stores field of type: number and select. I need to create a mymodule/config/schema/mymodule.schema.yml file, but don't know what to ...
0
votes
1answer
42 views

Change site name programmatically

We have a requirement that when we save a node that nodes title should be the site name. We used to do it in Drupal 7. But I was not able to find the proper method for it in Drupal 8. This is what we ...
0
votes
1answer
29 views

How to set a multi line value from drush vset

I was trying to add a value to the drupal antibot antibot_form_ids variable. drush vget antibot_form_ids returns a string separated by /r/n Adding just a value to this string isn't just enough. If ...
1
vote
2answers
240 views

Programmatically set the front page per site?

I have a site that is using a 'fake' multi-site instance (I think, someone else implemented it). We created 3 directories in sites: sites/site1 sites/site2 sites/site3 and in each settings.php ...
1
vote
1answer
38 views

How to sync configuration between multiple developers' environments

D8 Configuration management is really awesome and easy to use when there's only one developer working on a project. We are running into challenges in keeping configuration synced between environments ...
4
votes
2answers
6k 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\...
0
votes
1answer
64 views

Translation of label in yml configuration file

After having read https://www.drupal.org/docs/8/api/translation-api/overview and in particular Translation for shipped configuration and configuration schemas I tried to use this ability to have ...
3
votes
2answers
63 views

Is it possible to update module provided configuration schema in an hook_update_N()?

So I have a custom module with a module.schema file, defining a configuration schema for that module, not talking about database/field schema. module.settings: type: config_object label: 'Settings ...
1
vote
0answers
33 views

Difference between field and field storage in configuration type?

I am exporting a content type and field associated with the synchronize option available in Drupal 8. I exported and imported the YAML code for content type successfully. When I was about to do the ...
0
votes
1answer
23 views

Load the value of an entity field type in another form

I have created a custom field and I wish to load the value dynamically in another form in relation to the specific node entity the value belongs to. I understand that to get the value I have to use/...