Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

Filter by
Sorted by
Tagged with
41
votes
13answers
26k 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
vote
1answer
10 views

Where are the settings for read time module in admin area?

Installed the read time module and can not find any settings in the admin area. The description says its configurable, but where? I can see the field in manage display, but the article is not ...
0
votes
1answer
331 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
votes
1answer
26 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
693 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
23 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
36 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
8 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
526 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
503 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
25 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
363 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
854 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
612 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
764 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
24 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
39 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
18 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
16 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
27 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
76 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
19 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
373 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
33 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
46 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
812 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
928 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
738 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
361 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....
1
vote
1answer
18 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 ...
0
votes
1answer
638 views

Help with $base URL path in settings.php

Since I created my site (long time ago!) I have added content and changed many settings. My URL has always been www.domain.com/'drupalfolder'/(content) I want to remove the drupal folder from the URL ...
0
votes
1answer
477 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 ...
4
votes
1answer
1k 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
39 views

How to handle config changes on core update?

I have an 8.6.15 site managed by composer and drush. The db and config exports are in sync. Roling our new features using drush cim on production works fine. I now update core to 8.7 by running ...
0
votes
0answers
19 views

Data storage for custom config-entity sequence type

Using Drupal 8 I've got a custom content type application and a ConfigEntityType application_type for bundles of it. I need each bundle to store a list of strings when newly created/edited. E.g. ...
0
votes
1answer
34 views

Failed User Login

I have developed a website in Drupal 8 and have deployed it to production. I have created 7-8 other accounts for my content management team and have granted them limited privileges for creating, ...
1
vote
1answer
27 views

Where is the `Drush` command specific documentation?

To be more specific than the title, I want to know what drush cim exactly does, like: where is the drush cim command specific documentation? Does cim command remove the files after they are imported, ...
1
vote
1answer
496 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
2answers
200 views

Image Styles Not Generating Thumbnails/Previews

I have File Browser installed on my website. The module info can be found here: https://www.drupal.org/project/file_browser When I go to browse for pictures, there are no images. You can see what I ...
0
votes
1answer
27 views

How do I access the configuration variables present in settings.php through my code? [duplicate]

I want to access the variables present in the settings.php in my custom module. For example, if the settings.php file contains the $config['test']['uid'] = 'ABC'; line, I want to access the content of ...
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?
-1
votes
2answers
62 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' =>...
0
votes
0answers
33 views

Module enable / disable is slow using drush cim

I have 2 drupal sites which takes a high time to enable or disable modules, while other sites are faster. It is true these slow sites are more complex: it has a lot more of modules. Is there any ...
2
votes
2answers
322 views

Multisite config directories of subsides

I set up a local Drupal 8 multisite, using Acquia dev desktop. It's working fine. I added all Drupal 8 core files to my local repository and pushed them to a central remote repository. in sites/...