Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
2answers
533 views

Drush config-import/export [duplicate]

I'am trying to export menu items but the generated yaml files does not contains any reference to this elements. All menu files look like this: uuid: 12....04 langcode: en status: true dependencies: { ...
1
vote
2answers
104 views

Is there a performance hit to using persistant variables?

While working on some old custom code I noticed that variable_set() was being used in a manner that always made new key pair values and never made a call to variable_del. These values would be read ...
1
vote
1answer
43 views

Using variables in Drupal

Would appreciate any assistance of how to handle configurable URLs for each environment. The links need to take the user to a different URL depending on the environment the site is installed in. In ...
13
votes
3answers
6k 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?
1
vote
1answer
37 views

Which permission is associated with variable_set()?

It seems that only site administrators can use variable_set(). If this is truly the case, is there a special permission that grants variable_set() function to site administrators?
0
votes
2answers
43 views

How to delete all Persistent variables when a page is loaded?

I have many variables set through variable_set. Is there any other way to delete them all at once apart from variable_del? or How can find all the persistent variables set in the module?
1
vote
2answers
348 views

“Drush sqlc < myfile.sql” doesn't return the site to previously working state. Are there files to be deleted?

I've backed up my drupal 8 database via the CLI using drush sql-dump > myfile.sql. I make some changes to the site and break it, then I try to restore it via drush sqlc < myfile.sql. It works ...
4
votes
2answers
458 views

Installing / updating modules in multi-site environment

I am in the middle of configuring a Drupal 8 installation with multiple domains in a multi-site configuration. One thing that occurred to me, is if one domain/site updates a module, the other site ...
3
votes
1answer
441 views

What is the difference between the $config and the $settings variables in settings.php?

In the settings.php file of Drupal 8 installations, there are two different types of variables; $settings and $config. In Drupal 7 we used only $conf variable. What's the difference between $config ...
0
votes
0answers
67 views

Cannot delete taxonomy terms, Cannot use object as array

When trying to delete taxonomy terms using the backend I get a 500 error. I am able to update the terms, but not delete any. I was able to recreate this behaviour locally which was fixed with a core ...
0
votes
2answers
60 views

Lock configurations

I have EForm module installed on my Drupal 8 website. My customer uses EForm module to create new forms. The problem is that newly created forms are storing in configurations. Every time I deploy my ...
0
votes
1answer
31 views

How to export a module's configuration? [closed]

I've set up a module on one site and want to export it to another site. From researching, I understand you can use Features to do this. However there is no documentation detailing this. Any ...
1
vote
2answers
722 views

Drupal 8 : Get a config settings value being stored in blocs

I have create a block with a form and stored something i called 'submit_action_amu_dud_form_block_settings' public function blockSubmit($form, FormStateInterface $form_state) { $this->...
1
vote
1answer
266 views

How do I actually change the site name on a localized site?

Even after changing the settings in /admin/config/system/site-information, the page title still contains "Drupal". All external examinations of the site configuration (config table and exported files)...
1
vote
0answers
120 views

Change block configuration before render the block programmatically

I have a view that display some nodes and some of this nodes have a menu voice connected to them with sub menus. main menu: -node 1 [mid:407] --node 2 --node 3 -node 4 [mid:219] --node 5 I want ...
1
vote
0answers
32 views

Define config schema on an installation profile

I have a custom installation profile, which has a profiles/foo/config/install/foo.settings.yml. I try to declare a schema in profiles/foo/config/schema/foo.schema.yml but it seems that file is not ...
1
vote
0answers
37 views

How to add rdf mapping to custom entities? [closed]

How to add specific rdf mapping (ex dcterms) to custom entity fields?
1
vote
1answer
80 views

Can I use Feature for development and CMI only for deployment?

As a developer working in team I don't like using CMI to synch config from/into development server at all (cim/cex) in local development machine. Instead I'd like to use Feature. What I wanted to ...
0
votes
1answer
28 views

Where is the setting saved when I modify a configuration setting?

When I modify a setting from a custom module, where is that saved? How can I get that setting without exporting the configuration?
3
votes
1answer
177 views

variable_del wildcard when uninstalling a module

I have lot of variables created in a module. Is there any wildcard when deleting variables using variable_del. Ex1: variable_del($key . '_campaign_text_*'); Ex2: variable_del($key . '_campaign_text_%'...
1
vote
2answers
372 views

Including image styles in custom module

I was following topic. I can including image style in my custom module. But I have a problem. I can't reinstall module because of following error: Unable to install Module ABC, image.style....
0
votes
0answers
26 views

Not able to view the background of site?

I Have developed a Drupal 7 site, which is live now. Now I need to add some more additional feature in that site, so I set it up in my local by taking backup of production. Database is imported ...
0
votes
1answer
276 views

Export and import configuration settings and content [duplicate]

I have created two sites. They have the same modules and themes available, however I want them to be complete clones of each other without doing a manual database export and import. I attempted ...
3
votes
1answer
873 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-...
6
votes
1answer
659 views

How to delete a particular variable from a configuration created by a custom module

I have created a custom module and a configuration say 'abc_settings'. This configuration creates a variable for each vocabulary present on the site like vocab1_options, vocab2_options, vocab3_options ...
3
votes
1answer
160 views

How to copy view modes between content types in Drupal 8?

I've been doing my first Drupal 8 project, and a major pain point, when you have a site with 10 or more content types, is to copy a view mode to all the other content types after you set it up on one ...
3
votes
2answers
1k 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 ...
3
votes
3answers
1k views

Configuration override not work from settings.php

I add the following to the end of my settings.php $config['system.site']['name'] = 'Drupal 8 DEVELOPMENT'; When I run drush cget system.site name it still displays the old site name. Any idea why ...
2
votes
1answer
1k views

Does hook_install() get called before or after configuration yml files are loaded?

In Drupal 8, during module install, is hook_install() called before or after loading the .yml files in config/install? I've across a module that's using both (which seems like a bad idea on its own) ...
1
vote
1answer
158 views

Provide default site uuid on install

Can I provide default site's uuid static in Drupal 8. I am using docker with Drupal 8 and during configurations import the site is rebuild with docker resulting in different uuid each time. After that ...
-1
votes
1answer
373 views

Environment dependend workflow with configuration management

When using Drupal 7 with larger projects, we used a Custom module together with Features, Environment and Environment Indicator modules to keep special environment settings apart. We had at least one ...
2
votes
1answer
2k views

How to change the entity view display configuration programmatically?

In a hook_install implementation, I need to change the entity view display configuration of certain bundle / view mode combinations. For instance, I would like to change the 'teaser' view mode of the ...
0
votes
1answer
215 views

Modify custom module's setting.yml without reinstalling

I have made a simple custom module in Drupal 8, in which I use a settings file (config/install/my_module.settings.yml) I have one entry, let's say module: key: 'qsdqsd' So when I install the ...
0
votes
0answers
333 views

variable_get() not working

ok so i have this form that lets people select a month and i want it to be stored then i want to set a variable to that stored value and use it but its not working. it works on the form for default ...
0
votes
1answer
107 views

Blocks: Old vs. “Custom” and Config vs. Fields

I have quite a bit to ask in this question, so I apologize in advance. I believe these questions are all related, and I'm trying to grasp some thoughts on the new block system in Drupal 8. Background ...
1
vote
1answer
150 views

How do I create a variable to check last time hook_cron() implemented from a custom module was ran?

We have a custom module for which we need to run on a daily basis. I am not sure it is working, as I am unable to store the time correctly. Does the following code allow me to create a variable, ...
0
votes
1answer
30 views

Accessing values entered in custom fields added to install_configure_form

In my installation profile, I have added a text field to the install_configure_form by including: if (!function_exists("system_form_install_configure_form_alter")) { function ...
0
votes
1answer
18 views

How do i run the equivalent of single configuration import from a hook?

I have a hook_update_N that is changing a field. It is deleting the field and recreating it with the same name but a different field, formatter, and widget. The problem I'm having is that there is ...
4
votes
1answer
588 views

When 'cron_safe_threshold' is set to 0 in settings.php, should the dropdown value on admin/config/system/cron be “Never”? or is it irrelevant?

I've installed Drupal 8.1.6. As Ultimate_Cron won't work on this site consistently or reliably, I've decided to just use Drupal's core cron, triggered externally (via /etc/crontab) rather than using ...
1
vote
1answer
68 views

How do I update a field to use a different field_type?

I have created custom field_type for a field in my content type. The field 'field_content_category' already exists and is an entity_reference. Changing the yml file and importing doesnt work because ...
-1
votes
2answers
62 views

Include a link of node with text in block body

How can I include a link to a particular page in the block body? I don't want to create a custom block.
0
votes
1answer
35 views

Moved one site to another site files are refering old site

I moved whole Drupal setup from ex.(1.1.1.1 to www.example.com). After the move there are some issues. Some Drupal default files are not found error.(ex. close.png ,background.png) because the images ...
5
votes
1answer
658 views

Prevent Development modules from being added to configuration management

We have modules that are only used for local development like Stage File Proxy. How would I prevent these modules from being added to the configuration management?
7
votes
2answers
591 views

Features versus Configuration Management

I am building a Drupal 8 site and I have done some research whenever I should use Configuration Management or Features to export configuration and include it in my profile. In order to export and ...
5
votes
2answers
122 views

How do I correctly inform the system about my module's new config?

I'm working on a module that already comes with a config file in mymodule/config/install/mymodule.settings.yml, and I'm working on a new feature that requires its own set of configuration in mymodule/...
0
votes
1answer
593 views

How to use Gitlab server as a central staging server for Drupal8? Making the 1st push to Gitlab?

I just installed a Gitlab instance on my LAN. I want to use it as the central repository for a Drupal dev->test->prod staging setup. So, 1st step, I want to push my local "dev" workspace to the ...
4
votes
2answers
5k 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\...
2
votes
1answer
3k views

How can I retrieve the value of variable I have defined in a config form from a Twig template?

I have a module in Drupal 8 to build a configuration form where I can set the value of a variable. But I don't know how to retrieve the value of that variable from the twig template. In Drupal 7 I ...
3
votes
5answers
5k 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
0answers
39 views

D8: Multilingual configuration and dynamic content

I'm currently working on a multilingual Drupal 8 project that also takes advantage of D8's new CMI system (Buzzwords: Content Manangement Initiative). Is there some sort of best practice here? I ...