Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

Filter by
Sorted by
Tagged with
0
votes
1answer
48 views

What core configurations should be used in settings.php for a production site? [closed]

Can someone please share Drupal core configurations that should be included and/or excluded from settings.php to make the site both performant and secure?
1
vote
1answer
372 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 ...
0
votes
1answer
172 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
110 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 ...
1
vote
0answers
111 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
367 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
955 views

I have the following errors in my configuration page

I uninstalled a few modules. ~/apps/drupal/htdocs/modules$ drush pm-uninstall relaxed The following extensions will be uninstalled: relaxed Do you really want to continue? (y/n): y ...
0
votes
2answers
59 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
586 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 ...
1
vote
1answer
133 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 ...
0
votes
1answer
203 views

Error on config import - Field Collection

I am currently running into a config import error and it seems like it has something to do with field collections: Finalizing configuration synchronization. ...
0
votes
0answers
230 views

How to create a table in second database with hook_schema

I want to use two databases, that works following: How can I setup multiple database connections in Drupal 8? . I can set the connection in the settings.php file, access it by injecting a different ...
4
votes
3answers
318 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
79 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 ...
18
votes
3answers
9k 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?
0
votes
0answers
93 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
1answer
156 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
2answers
177 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 ...
1
vote
0answers
35 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: ...
0
votes
0answers
23 views

DATABASE SQLSTATE SQLSTATE[HY000] [duplicate]

Today we tried to check our website but we found this error. I don't know what happened exactly. PDOException: SQLSTATE[HY000] [2002] No such file or directory in Drupal\Component\DependencyInjection\...
-2
votes
2answers
51 views

D7 site does not show well under https

I installed https on my server with certbot and let's encrypt.However site displays garbled under https, which I need for several reason, http requests are not redirected to https for that reason, but ...
2
votes
1answer
140 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
120 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
32 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
1answer
830 views

How to override “active configuration” when the theme is installing?

I have a theme that imports configuration when is installed. The problem is when the configuration is already there and is active. Unable to install MYTHEME, field.field.user.user.user_picture, ...
1
vote
0answers
708 views

“PluginNotFoundException” when saving a view

I download the backup of my front page view. Then I decide to remove it (using the UI) and then added back again using the configuration import. Then I try to edit that view and does not let me save ...
6
votes
2answers
4k views

How to override configuration from a file?

I have been playing a lot lately with an import configuration to Drupal 8. And I notice that all documentation show you how to edit value per value instead of overriding the entire config file. You ...
0
votes
1answer
530 views

Access violation error on any page or drush

Recently started working with an inherited Drupal 8 website which I am trying to get up and running on my Mac OS X (Sierra) but I am getting this error with a stack trace every time I try run drush or ...
2
votes
1answer
147 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') ...
1
vote
0answers
128 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
85 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
393 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 ...
3
votes
3answers
2k 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 ...
8
votes
3answers
5k views

Export D8 menu configuration

Looking for a way to export menu configuration. The Configuration management system will export the menu itself, but not the menu links configuration. I am looking for a way to put one of those mega ...
1
vote
0answers
87 views

How to Add a Default Prefix into the Acquia Dev Desktop Settings

I'm using Acquia Dev Desktop for my local Drupal 7 development. All of the tables in my sites are prefixed with "dr_". Whenever I create or import a site, I have to manually change the settings to ...
1
vote
1answer
137 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 ...
-1
votes
1answer
89 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 ...
8
votes
2answers
707 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 ...
2
votes
1answer
104 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 ...
2
votes
2answers
257 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
1k views

how to access configuration module from service

I have module config, something like: modulename.config.yml: modulename: core_address: 107.101.xx.yy core_port: 153759 core_user: superuser core_pass: superpass And I have module service, ...
2
votes
6answers
63k views

Database error: Lost connection to MySQL server at 'reading initial communication packet'

this has driven me crazy, I just couldn't find out what is wrong with it. I moved my site onto a test directory under my domain '/drupal_test', I have transferred the database over, set up ...
1
vote
2answers
486 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 =...
1
vote
2answers
307 views

How can I force changes to go to settings.local.php?

I have a settings.php file in git which has the logic to include settings.local.php already uncommented, with settings.local.php in .gitignore for security purposes. I would like to be able to ...
2
votes
0answers
190 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 ...
5
votes
2answers
255 views

Configuration management with different database and websites

We have a central code base (Git repo). From this code base we deployed several websites already. Till now we used features. The websites which are already in production they have a filled database ...
1
vote
1answer
182 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
150 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
1answer
33 views

What is the recommendation for mapping state?

The configuration in D8 is nicely mapped in config schema file so any developer knows what configuration changes can be made. But what about state? Is there a recommended way to map state? Or is it ...
2
votes
0answers
141 views

What does a 'reset' refer to with Drupal?

In the docs for the State API, the term 'reset' is used, without any reference as to what a reset is: use State API to store transient information, that is okay to lose after a reset. I've spent ...