Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

Filter by
Sorted by
Tagged with
3
votes
2answers
127 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
61 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
24 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/...
1
vote
1answer
207 views

How come there are different UUIDs for multiple environments?

We have D8 site where we use Configuration Management to export and deploy to multiple environments. We recently created a new content type, Blogs where we added a few fields (field_url, field_country)...
16
votes
7answers
7k 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 ...
1
vote
1answer
306 views

basics of settings.php and settings.local.php?

What is the up-to-date basic workflow regarding database credentials when you launch a local version of a site that is already operating remotely? What are the considerations and how is each best ...
1
vote
0answers
65 views

Prevent block config from being exported?

In Drupal 8, how can I prevent block instance config from being exported? I want it to just be ignored.
0
votes
1answer
95 views

Drush not connecting to site's settings.php

When I run drush --debug status in the docroot of my Drupal site, I get the following message: [user@computer]$ drush --debug status Phar detected. Proceeding to drush_main(). Loading drushrc "/home/...
2
votes
1answer
39 views

Exporting and Importing configuration setting only

I have a development and a production site. Both are working in an offline environment, Drush and Composer are not installed. The plan is to make all changes always on the development and during each ...
0
votes
1answer
24 views

Config changes only propagated via manual form submit

My question is related to the Search API Drupal 8 module. I am modifying my configuration via config file updates. After I am installing my custom module, I can see my config reflected in the search ...
0
votes
2answers
88 views

Development without pulling production DB to your local machine

When you push configuration to production, any configuration that has changed in production that has not been exported into code will either be reset to the values in code or be wiped out entirely if ...
5
votes
5answers
6k views

Unable to install the XYZ module since it requires the A module

When running (right after site install) the drush cim -y command, the following error appears: Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. in ...
1
vote
2answers
467 views

Why is it possible to write any string in the hash salt

I have researched a bit, but could'nt find a precise answer to why you can write any string in $settings['hash_salt']. For me it does'nt make sense that the site chashes if no hash salt has been set ...
0
votes
1answer
1k views

How to override configuration variables in settings.php

I need to override configuration variables declared in the settings.php. How this can be possible? Any help me on? Note: I am trying to override a custom configuration variable, not any default one.
3
votes
3answers
557 views

How to know when to use $config or $settings overrides in settings.php?

I want to be able to disable certain options of modules on non-production environments. For example: Disable XMLSitemap from running Set "Read Only" mode for Search API indices to TRUE Set robots....
-1
votes
1answer
97 views

what does “vcs” mean when i export a configuration

I would like to know what vcs stands for . when i do a drush config:export, i have to choose "vcs" but I'm not sure what that means? I am on an acquia server , does that have something to do with ...
5
votes
2answers
620 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 ...
2
votes
2answers
2k views

Choose a destination after drush cex

In my sites/default/settings.php I changed: $config_directories = array( CONFIG_SYNC_DIRECTORY => 'sites/default/config-sync', ); I created the folder config-sync in sites/default/ When I do ...
0
votes
1answer
97 views

Can't import configs on server due to some entities

So when i try to manually import configs (/admin/config/development/configuration) i get these messages: Entities exist of type Media and Media type Image. These entities need to be deleted before ...
0
votes
1answer
40 views

Module dependent on field configuration in another module

I have two modules that rely on the same field; A simple boolean field that represents a state for taxonomy terms. My problem is my configuration management for this. My ideal situation would be to ...
2
votes
1answer
182 views

Config import conflict, how to remove lock

I am trying to import config on my staging site, and I repeatedly get the following message: Another request may be synchronizing configuration already. I know that there are no other processes ...
1
vote
1answer
63 views

Trusted_host_patterns not working with domain

I'm working with a drupal 8 site and trying to get trusted_host_patterns working properly with the domain that I'm using, and no matter what combination of regex I try I can only get it to work with ...
0
votes
1answer
33 views

How can I iterate through all the key and value of configuration object

I have an admin setting form (Configuration form) called 'example.settings'. I can load the configuration using below code. $config = \Drupal::config('example.settings'); Is there a way to iterate ...
2
votes
1answer
258 views

Settings contains a dot which is not supported, but module gets enabled properly

I'm developing a search engine module for Drupal 8. On a clean new Drupal website, I can install it from the admin GUI, but when I enable it I have the classical white screen (The website ...
0
votes
1answer
289 views

How to remove field from form and configuration?

We have a custom module, mymodule that has a form, mymoduleForm with two fields: enabled content types and urls. We no longer need the enabled content types field on the form and want to remove it ...
4
votes
2answers
837 views

Manage config translations programmatically

My module creates and manages some config_entities programmatically (ie. not through an EntityForm) in response to associated content entities being saved. In order to handle multi-language content ...
1
vote
0answers
139 views

Add permission to existing role in custom module using configuration

Permissions may be added to existing roles programatically as described in this answer. However, I would like to put that into configuration. I can create a role calling king by putting user.role....
6
votes
2answers
7k 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 ...
0
votes
0answers
83 views

What is the difference in State API and Config API?

It is a bit confusing to understand the difference in State API and Config API in Drupal 8. I went through the documentation of both on drupal.org but it is not clear to me yet. Do we define both ...
0
votes
0answers
18 views

How to enable module in production but not dev? [duplicate]

Is there a way (via settings.local.php maybe) of having a module enabled in production but not in dev. I am thinking of PHP Shield in particular
2
votes
1answer
161 views

Unexpected error during import . . . plugin does not exist error on drush config import

This is an issue I've had occasionally when trying to delete a plugin in a custom module. In this example, once a filter format filter plugin has been enabled it's impossible to remove. If you ...
0
votes
1answer
169 views

Theme shown without styles

I executed the config:import: import successfully, but now it seems that the theme settings are no longer found. The site is now seen as in the attached image How can I solve the problem? Note: I ...
4
votes
3answers
4k views

config-import error: These entities need to be deleted before importing

I have two Drupal environments with the same system.site:uuid In the main Drupal I export the configuration with command: drush config-export deploy -y In the destination drupal I import the ...
1
vote
1answer
190 views

Optional configuration and order of enable modules on profile

I have a bug or a misconfiguration I don't understand. I'm creating a profile to create new web sites with an advance configuration quickly. But I meet a bug during installation with dependencies of ...
5
votes
1answer
630 views

Difference between $this->config and \Drupal::config in ConfigFormBase

I want to override a custom module configuration in the settings.php file. So the configuration in database can be independent from the environment. $config['my_module.settings']['prop'] = 'foo'; I ...
8
votes
3answers
4k views

How to solve the “The following module is missing from the file system” error?

Getting the following error in the admin in a Drupal 8 site: The following module is missing from the file system .... Looks like a custom module was enabled and deleted without disabling it. How ...
1
vote
1answer
132 views

How to extend block.block.* schema configuration file

Someone know how to exend this schema located in block module in core, to add a new data type in mapping from my custom module? The point is that I need to add a Boolean field for all the blocks in ...
-1
votes
2answers
71 views

Create a setting.*.php file for every stage of the website

I understand that my question could be opition-based and that it depends on the comfort of every drupal developer so please do not flag it as so ! For every Drupal 8 website i start, i use the below ...
4
votes
1answer
487 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 ...
0
votes
0answers
18 views

Configuration not saved on server

I am building an Acquia hosted Drupal 8 site. I saved config files in /config/sync folder and it's defined in settings.php. Everything works fine. After then, I pushed up the files using git in dev ...
0
votes
1answer
37 views

Two sites, same codebase mystery

Ubunutu Server, two Drupal sites. One dev and one live. Both domain names take you to the same code and database, the ones correct for the live site. Checked apache virtual host files. Both the dev ...
0
votes
0answers
18 views

Is it possible to use an API to update CSS Injector rules?

I want to maintain a record of changes to CSS Injector rules by editing the CSS code in a node and using rules to update the relevant CSS injector rules. With the help of the Diff module I should ...
3
votes
2answers
4k views

How to test if memcache is working?

After successfully enabling it, how do you know it's working? And how do you know how much better performance is increased? In homepage of https://www.drupal.org/project/memcache it says: A module ...
0
votes
1answer
270 views

Drupal::config to access Site default timezone

Like the title says, I want to access the sites default timezone. Guess Drupal::config('system.date')->get('timezone')['default'] is the right function. I really would love to know how to use ...
0
votes
0answers
59 views

Set dynamic $base_url with Domain Access module to avoid redirects

If you run two URLs with Domain module like e.g. main.site.com sub.site.com main.site.com is main site, so if you go to sub.site.com/user and login, it redirects back to main.site.com. This happens ...
0
votes
1answer
68 views

Is it possible to get original configuration when another Config Split is activated? (CONDITIONAL SPLIT is used)

I have dev and prod environments. I use payment getaway. There are different api keys for dev and prod envs, it's like test and live mode of the payment method. There is active dev config split ...
0
votes
2answers
498 views

Problem with remote sync because of wrong UUID

I have a problem with syncing my config to the remote server with Drupal 8. When I pull everything with GIT, and use drush to update the config via drush cim I get the following error: Attempt to ...
2
votes
1answer
89 views

Where are config dependencies stored?

I have this error when importing a single piece of config manually: Configuration foo.api depends on the MODULE extension that will not be installed after import. There is no "MODULE" extension in ...
0
votes
1answer
26 views

Is there a way to search Drupal's and contrib modules configuration settings?

With so many different modules in use with configuring Drupal it is hard to keep track of which settings are configured where, such as whether some CSS is set by the Code per Node or CSS Injector. It ...
0
votes
1answer
48 views

What core configurations should be used in settings.php for a production site? [closed]

Can someone please share Drupal core configurations that should be included and/or excluded from settings.php to make the site both performant and secure?