Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

Filter by
Sorted by
Tagged with
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 (...
5
votes
2answers
15k views

Can't edit settings.php in Drupal 7 - Premission Denied - Can't Write to File via Cpanel File Manager

Trying to edit settings.php via Cpanel File Manager I can CHMOD the file to anything I want and back but can't write to it. I get the following message: Could not write /home/testing&#...
1
vote
1answer
24 views

Contact email flood limit is per whole system(application) or user/ip based?

I have a question with contact emails flood limit which is present in contact.settings.yml, the limit is going to for whole system(application-wide) or is it going to limit the number of emails per ...
0
votes
1answer
351 views

Enable rest resource resource when module installs

I have a custom rest resource I have created within my module: /** * Provides a Demo Resource * * @RestResource( * id = "custom", * label = @Translation("custom"), * uri_paths = { * "...
1
vote
1answer
510 views

How do I connect to an external database and specify the schema to use?

I want to connect Drupal to an external Database and I need to specify the schema on the settings.php file, otherwise Drupal schema module connects by default to the 'public' schema. I tried, without ...
0
votes
1answer
653 views

Why when I do a configuration export does the config.tar.gz in tmp not get copied to the sync folder?

This happens when I use the UI and drush cex. The config.tar.gz is created in the tmp folder but nothing is created in the sync folder that I created in sites/default. I have searched for similar ...
1
vote
1answer
464 views

Conf_path is deprecated but what is its replacement?

Im upgrading a D7 module to D8 and it turns out conf_path() is deprecated but I cant find the replacement. I found a github page that said use this DrupalKernel::findSitePath(Request::...
-2
votes
1answer
76 views

How does `drush cim` find and handle the config-directory? [closed]

I would like to know where the config directory is, and how drush cim command exactly handles it? Edit: The old title (i.e. "Where is Drush's command-specific documentation?") was because I thought ...
0
votes
0answers
24 views

Where is $config_directories value set in Acquia BLT?

Generally to setup path for Config Directories,it is defined under settings.php as $config_directories['sync'] = 'path/to/config'; but in a blt setup when I checked settings.php sites/default/...
0
votes
1answer
17 views

What does extension-provided configuration mean in Config Snapshot?

Configuration Snapshot enables snapshotting of extension-provided configuration. It's used by Configuration Synchronizer to support updating configuration provided by modules, themes, and the ...
0
votes
1answer
48 views

Enable translation for theme settings

Theme settings are not translatable in core. Is there a way to make them translatable? I have some additional theme settings which needs to have different values per language. I'm trying to achieve ...
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 ...
0
votes
0answers
17 views

Completely delete an entityqueue config

I'm trying in my module uninstall hook to delete a config of an entityqueue which is created by the module myModule. entityqueue.entity_queue.my_entityq.yml : langcode: en status: true dependencies: ...
0
votes
1answer
23 views

Hook to run afer config import

I need to run some code after the config for my module is imported(it will create/update a css file that depends on configuration). So what is the correct hook to use? The module install will run only ...
3
votes
2answers
495 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']...
1
vote
1answer
410 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 ...
41
votes
13answers
27k 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 ...
-1
votes
1answer
36 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 ...
1
vote
3answers
1k views

I need to load DB configuration dynamically in Drupal 7

Can I put variable_get in settings.php to load DB settings dynamically or there is a better way.
2
votes
1answer
739 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/...
1
vote
1answer
38 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
5
votes
4answers
917 views

How do I programmatically change settings to simplify sharing of config changes?

I'm thinking specifically here of layout changes, such as: moving a block around, or when a new block is created and needs to be positioned, and shown or hidden on specific pages. Currently, when ...
2
votes
1answer
37 views

How to get translated field_storage_config

I need to programmatically set the translated values for several fields on a node. For that I would like to set their values in the fields field_storage_config. Adapted from another question's answer (...
0
votes
1answer
10 views

How to locally export config from a remote environment?

If I have config that's out of sync on production, I may want to export it without copying down the database, or I may have environment-specific config that interferes with exporting config from the ...
0
votes
2answers
546 views

Error migrating from localhost to server: PHP Unsupported operand types

I'm migrating a Drupal 8 project I developed locally up to the server as a subdirectory in my hosting service that my site domain points to. I've cleared the caches (with drush cr and truncating the ...
2
votes
2answers
513 views

Can a domain redirect work for both http and https?

Currently hosting a site on Pantheon and I would like to redirect traffic to a single domain. There is already a lot of links inside my site that are using: http://example.com/somepage, http://www....
1
vote
1answer
27 views

How to delete paragraph when uninstalling the module?

I have been creating the custom module which have the paragraph configuration, when installing the custom module, the paragraph config will be stored in the database and then It will be available in ...
-2
votes
1answer
25 views

Force one config to be imported before another?

Hitting an issue when installing a site from config and I think the order of operations may be the issue. Is there some way to ensure that one config is imported before another one? Edit: sorry, ...
1
vote
2answers
381 views

Unable to save content language configuration

My Drupal 8 website is multilingual and has many entity type bundles for nodes, taxonomy terms, paragraphs, media et cetera. This leads to a content language settings form (admin/config/regional/...
4
votes
2answers
889 views

How to use settings.local.php with Drupal 7?

I couldn't find answer from previous questions nor drupal.org/pantheon.io. I don't know that how to get local Drupal to use settings.local.php? There isn't a settings.php if I clone the repo from ...
0
votes
1answer
646 views

Blank screen with no error messages on new server

I have a working drupal 7 site, built with git, running on 2 different servers, one test server and one server used for staging and production sites. So I know that the site is working. So after ...
1
vote
1answer
812 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 ...
0
votes
1answer
26 views

CKEditor configuration is not working

In my site it was not required to add color to text or change its size, but now we want to add formatting to our posts. So I tried to configure CKEditor's Toolbar to add text formatting options in ...
-1
votes
2answers
49 views

How to Restrict some special character in password field

I'm very new in Drupal, I would like to restrict some special characters from user password field Is there any way to edit configuration of core modules i'm trying to create preg_match modules . i ...
0
votes
1answer
22 views

Modify token used in path URL alias generation

We would like to have the URL pattern for Article content type to use article/[node:field_short_description]. In the scenario where field_short_description is not populated, we would like for the URL ...
1
vote
1answer
17 views

How can I export Image Crop configuration with an Image Style for custom module?

I have a custom module I'm re-using on other projects and I want to include an image style with an image crop configuration. Under the configuration menu, I export a single crop item: langcode: en ...
1
vote
1answer
29 views

How can I read config schema from a config entity?

I need to read the schema definition from a config entity, which is located in config/schema. For example the schema from a node type defined in node.schema.yml: node.type.*: type: config_entity ...
4
votes
1answer
77 views

Benefit of config entities over regular config entries?

In Drupal 8 it is possible to store configuration in "config entities". However, the same can also be achieved with non-entity config entries. E.g. one example for a config entity schema, from core....
0
votes
1answer
20 views

Config split settings file generated into split directory

Drupal 8.7 I have a multisite split. The config_split.config_split.<sitename>.yml files are supposed to go into the config/default directory. For some reason when updating a split on one of my ...
0
votes
0answers
30 views

Get Translated Config

I've followed a few tutorials on how to set up a custom settings form and create translations. All this seems to work, but after adding a translation, I am unable to get the config settings for that ...
2
votes
1answer
392 views

Overriding system.site.uuid with an environment variable

I have a need to have separate sites behave as if they are clones of each other; that is, they each need to have the same site UUID. Due to the environment I am operating in, I am unable to change ...
0
votes
0answers
18 views

The drush command 'variable-get' could not be executed

Command variable-get requires Drupal core version 6 or 7 to run. The drush command 'variable-get' could not be executed. drush st Drupal version : 8.7.3 Site URI ...
0
votes
0answers
35 views

Config import failed “Duplicate entry”

I really want to like the configuration management system in Drupal. Over time, I've learned to tamp down my expectations in how it can be used to develop against a production config. On production, I'...
1
vote
2answers
48 views

How can I update existing config from a custom module's config/install yamls?

I added some config yml files to my module's config/install directory so that it is installed directly when installing my module, it works well only if there isn't a config file with the same name ...
0
votes
1answer
585 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 ...
0
votes
1answer
837 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
974 views

Trusted Host Patterns Settings Not working with IP

So I am trying to get this drupal(drupal845.localhost) site accessible by my VM. But the Trusted Host Settings are not working. Here are the settings in my settings.php $settings['...
0
votes
1answer
764 views

Image styles with $settings['file_public_base_url']?

I deep dive in the settings.php file of Drupal 8.1 and try to configure $settings['file_public_base_url']and $settings['file_public_path']. All media links are correctly rewritten, that works with ...
0
votes
1answer
371 views

How do I tell drush not to overwrite some configuration settings?

I tell drush this: drush @live cim --skip-modules=system,swiftmailer and drush replies with this: Collection Config Operation swiftmailer....
2
votes
1answer
21 views

Use hook to get the domain configuration from language

We have enabled English, Spanish, and French on our site. On Regional and language >> Languages detection we selected URL for Content language detection >> Detection Method. For Part of the URL that ...