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

Managing configurations across environments is part of the configuration management.

3
votes
2answers
84 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 ...
0
votes
1answer
17 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
17 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 ...
1
vote
1answer
30 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 ...
0
votes
1answer
14 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 ...
1
vote
1answer
83 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
27 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 ...
0
votes
0answers
13 views

Install and configure Split module for existing configuration files

I have an existing drupal 8 project that has sync directory with the all configuration files. I was wondering if is possible to change this and use the configuration split module:
1
vote
0answers
17 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....
0
votes
0answers
14 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
16 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
28 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
23 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 ...
1
vote
1answer
14 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 ...
0
votes
1answer
24 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 ...
0
votes
0answers
16 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
27 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
1answer
30 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 ...
2
votes
1answer
49 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
25 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
34 views

Issues migrating site config at various points in project lifecycle

Issues migrating site config at various points in project lifecycle Hi My team and I have begun a new project for our company using the very latest version of Drupal 8 (version 8.5.6) We wanted to ...
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 ...
0
votes
0answers
37 views

How to delete configurations when module is uninstalled?

We have a custom module mymodule that has the following structure. It basically has a configuration object that we are using in a mymodule_preprocess_node() call to do some logic and display certain ...
0
votes
0answers
23 views

Properly export text format and editor settings

I'm trying to export the CKeditor settings and restricted_html settings but it's partially imported in the end. I'm exporting the editor.editor.restricted_html.yml and the filter.format....
3
votes
1answer
312 views

When to create schema while working with config entity?

We have a custom form mymoduleForm.php that is used to perform some logic by calling mymodule_preprocess_node(). We were able to add addCacheableDependency() and now the mymodule_preprocess_node hook ...
0
votes
1answer
63 views

Why when I do a configuration export in Drupal 8 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 ...
0
votes
2answers
29 views

Remove Configuration Management Destination

I'm using drush cex or drush cim to export and import configuration on D8 site. Every time I run those commands, I get asked a question to select option for cancel, sync or staging, which is quiet ...
1
vote
1answer
56 views

Edit a config variable of a custom module in controller

Is it possible to edit/create a config variable of a module in a controller created in the same module? For example: module_name/src/Controller/MyController.php: class MyController extends ...
1
vote
1answer
344 views

How to clear cache for config entity after making changes?

We have a custom form mymoduleForm that has mymodule.settings which stores some values that we need to run some logic when calling mymodule_preprocess_node() hook. The form just has a text area where ...
4
votes
3answers
306 views

Is it possible to hardcode views as part of the custom module to avoid `config/sync`?

I've exported views into the custom module using Drupal Console and config:export:view command, so they exist as part of the module in modules/custom/my_module/config/install (YAML files). After I've ...
0
votes
0answers
39 views

How can you unset entity view display component with config override?

I have an entity view display configuration where I would like to "unset" a component (one of the field). I implement the ConfigFactoryOverrideInterface with the right service configuration. Is there ...
1
vote
1answer
160 views

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....
0
votes
0answers
35 views

system.site.yml not installing correct site settings

performing D8 install through a custom profile, added a system.site.yml like: name: 'Portal Manager' mail: cms-admin@example.com slogan: '' page: 403: '' 404: '' front: /user admin_compact_mode: ...
0
votes
0answers
8 views

Config entity import order

I have got a custom module that creates two config entity types: - type-1 - type-2 Those config entity types create config entities like for example: - my_module.type-1.config-1 - my_module.type-...
1
vote
0answers
28 views

Drupal 8 config yml differences due to ordering/positioning of elements

Got a really annoying thing related to config-import/export, due to the positioning of elements in the yml file the config never syncs between production server and development server. For example: ...
2
votes
2answers
43 views

Listing variable values using drush

I would like to list the values of certain variables using Drush in order to make sure they are in fact the variables that I intend to add to my feature. It seems that some variables are parents which ...
0
votes
1answer
140 views

How hide from menu content type Basic Page and Landing page

In Drupal 8, I tried to remove default Basic page and Landing page content types, but it have content related to them. So, my quick fix will to only hide those one from some user. I tried with ...
2
votes
1answer
71 views

What is the difference between core.entity_form_mode and core.entity_form_display?

I'm trying to learn how to configure content types and form modes programmatically in Drupal 8. I've created the following using the UI: A content type named book A form mode for content, named foo A ...
0
votes
0answers
35 views

Add custom variable to page.tpl.php using custom module?

I found this solution here: https://www.drupal.org/forum/support/module-development-and-code-questions/2010-12-25/add-custom-variable-to-pagetplphp I created a module for give possibility to some ...
0
votes
1answer
22 views

Field without Used in data in Fields Report

I had several fields on content that had an empty Used in in /admin/reports/fields. Apart from being inelegant :-), it's a real problem because Views doesn't see them properly as belonging to content ...
0
votes
0answers
66 views

How to set/ delete array variables in .yml file using config factory?

File below is installed successfully when I install the module 'abc'. abc/config/install/abc_custom.yml langcode: en status: true dependencies: config: - field.storage.node.body - field....
2
votes
1answer
72 views

How do I stop a module from installing optional configuration, or make sure it's installed by the time I want to remove it myself?

I don't want the "Frontpage" view to be installed along with my installation profile. I tried adding a hook_install to a module which does this: \Drupal::entityTypeManager()->getStorage('view') ...
0
votes
0answers
44 views

PHPUnit Test run Error with ConfigFactory

I'm running an error with the following test I wrote including some config. I don't know if my test is even properly written so any advice in improving that code is welcomed. Since my test is not ...
1
vote
1answer
39 views

Is it possible to add folders in config/install?

I am working on a Drupal 8 module that has a fairly large number of configs (a few content types and fields, with 20-25 config files per content type), and one thought I had for organization was to ...
0
votes
0answers
112 views

Drush Config Export not working after Site-install Standard

I have a Drupal starter site created and pushed to bitbucket. For every new project I start I clone this site and start working from there. It worked for a while but I'm trying to get it to work for a ...
-1
votes
1answer
59 views

Best Practices for Acquia: Reconciling Production Database back to Dev before update; what is the workflow?

In about a week, I have to update several production sites hosted in AcquiaCloud environments to 8.5.3. All of these sites receive frequent real-time DB writes from user-submitted content. I can ...
1
vote
1answer
83 views

How to configure Trusted_Host_Settings for subdomains?

How to configure Trusted_Host_Settings for subdomains? The documentation does not give an example of a subdomain. For example, I have an Add-On domain that points to website.info, but the subdomain ...
3
votes
1answer
31 views

Fixing configuration inspector missing schema errors

I'm using the configuration inspector to fix schema issues before I put a module live as a full release. I'm finding the following error, but I'm unclear on how to fix it. The module provides a new ...
0
votes
1answer
62 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)...
2
votes
2answers
102 views

Extending block configuration schema

I'm using the Configuration Inspector module module, and I'm finding a missing schema error. The configuration is for block.block.pminbox.settings.thread_count The block itself is a plugin, created ...