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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Managing configurations across environments is part of the configuration management.

0
votes
1answer
20 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
15 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
32 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
16 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
102 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
20 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
25 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
43 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
116 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
110 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
36 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 ...
0
votes
1answer
51 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
28 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
7 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
24 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
36 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
136 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
59 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
29 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
32 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
57 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
31 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
62 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
51 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
76 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
25 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
45 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
67 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 ...
1
vote
2answers
104 views

Get labels of view modes in Drupal 8

I'm trying to rebuild the pullquote module in Drupal 8 but am running into an issue accessing view modes. In the Drupal 7 version, the view_modes variable is set by the following lines: $entity_info =...
2
votes
0answers
69 views

Configuration sync with deleted field

I have a field field.storage.node.field_create_ic created with type 'calendar_download_type' and it is one of the contributed module (ics_field). Now, in my local environment I deleted the field and ...
0
votes
0answers
21 views

What is the “hash” value in the Lingotek module's configuration yml files, and when does it change?

I changed the configuration in Drupal 8 and exported it. When I see the difference between the previous and current values, I see the hash value for the Lingotek module's search for internal users ...
0
votes
1answer
40 views

How to create a test configuration that can called in a test class?

I am attempting to write a unit test by extending UnitTestCase. Below is how my code works, but I need a way to create a test (or mock) configuration that can be used to satisfy the testing. How can ...
0
votes
1answer
94 views

Configuration variable inside a hook take always the default value in a PHPUnit test

I'm trying to create a Functional test for the dev version of the No Autocomplete module to test that if the configuration is set then an autocomplete attribute=off will be added to the password edit ...
0
votes
0answers
9 views

Adobe_DTM how to switch staging vs prod dynamically

The Adobe_DTM plugin has a drop down in admin that lets you manually switch environments (production vs staging). This should be dynamically configurable preferably with config switch. How to ...
1
vote
0answers
202 views

How can locally deleted fields also be deleted on production?

We are using D8's Configuration Management for our site. When we delete fields in our local development environment the corresponding content type and field yml files are updated to reflect the change....
0
votes
1answer
34 views

structure_sync not working

I am trying to use structure_sync within my Drupal 8.4.4 project to export the block content of custom blocks as a configuration (see also the discussion "Custom blocks cannot be properly exported and ...
0
votes
0answers
23 views

Has anyone set up Drupal with Piwik/Matomo in a Docksal environment?

Piwik (now called Matomo) is the open-source analytics package for which there is a contrib module (D6, D7 & D8) that applies the JS tracking code to the Drupal templates. Docksal is the ...
1
vote
1answer
92 views

Configuration management and site specific configuration

I have different site environments for my site; dev, test and live site. On dev (local develop) my solr settings are different then on my live environment. How do I configure site-specific solr ...
-2
votes
2answers
86 views

Drupal 7 variable_get()

How to get variable from help of variable_get function, function has saved value on any db table or some where else?
0
votes
1answer
24 views

Do not import configurations if already exists

I have built a custom module and there are two configuration files in config/install directory of my module. When the module is installed the configurations are installed correctly. When I uninstall ...
1
vote
1answer
136 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 ...
1
vote
1answer
78 views

Missing Schema on custom field only during PHPUnit Test

I have a custom field setup that I created similar to this tutorial. I exported all my fields on my node to a test module and enable it during my PHPUnit test. I run my test with the following ...
1
vote
1answer
48 views

How do I write a config file manually?

I need to find out how to manually create a configuration file, one which will be included with a custom theme as optional/required upon installation. I know I need to create a file in themes/mytheme/...
0
votes
0answers
18 views

How can I exclude the display configuration for a content type using Configuration Split?

I'm trying to exclude the display configuration and the fields visible for content types, so using Configuration Split I have create an 'active split' configuration where the elements that are part of ...
0
votes
1answer
50 views

How to import a display mode configuration from a custom module

I have a custom module with the file config/install/core.entity_view_display.node.event.featured.yml which contains config for a display mode called 'featured' for the content type 'event'. The ...
0
votes
1answer
93 views

Fatal Error HtmlRouteProvider not found?

Fatal Error: Fatal error: Class 'Drupal\custom_avatar\CustomAvatarHtmlRouteProvider' not found in /Sites/drupal8/core/lib/Drupal/Core/Entity/EntityTypeManager.php on line 252 I am creating ...
0
votes
1answer
74 views

Features along with configuration synchronization

I am planning to use features to bundle some of my specific works. Example: I want to bundle article content types along with its views, fields and related other stuffs. Can I just use features to ...
0
votes
2answers
40 views

Export block that exists in two or more regions

Does anyone know how to export block that exists in two or more regions into yaml file? This is the scenario I'm facing. A 'sitebranding' block is placed onto header and footer regions. When I go to ...