Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

Filter by
Sorted by
Tagged with
2
votes
1answer
113 views

Why does the Configuration Management module warn not to use in production?

In the Configurations Management module, right before you click the Import button, it warns: Importing configurations will write your configurations directly to the activestore. DO NOT USE THIS ON ...
2
votes
2answers
3k views

Drush database connection issue

I am stuck with getting Drush to work properly on my development server. And I am pretty sure the main reason is linked to not being able to connect to my site database. My setup is as following: ...
2
votes
1answer
49 views

How do you export configuration from configuration module

I need to include the configuration that I track in configuration modules into my install profile or however I will allow so that it will be initialised on install. How do I do this?
2
votes
1answer
2k views

AJAX calls fail when the base URL is set

I have installed the Drupal 7.17 security update, and I am having some issues with my site. If I comment out the $base_url ='www.xxx.com'; line in the setting.php file, the AJAX calls work; when I ...
2
votes
1answer
137 views

What's overriding my local_settings.php?

I'm using a local_settings.php file, that includes several $conf settings. All of the settings were working as expected until just recently when the mail_system setting started getting overridden ...
2
votes
1answer
273 views

Can I setup a backup migrate schedule from settings.php

I am using Pantheon to host a development, staging and production drupal 7 site. I have backup migrate module setup to perform period backups. When I migrate the production site's content to the ...
2
votes
0answers
189 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 ...
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 ...
2
votes
0answers
173 views

Exported field collection field has null UUID

In D8, I have a configuration management error. I have created a field named 'field_icon_link' of type “Field Collection”. I export my config. If I try to import this config I get a UUID error. ...
2
votes
0answers
140 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 ...
2
votes
0answers
47 views

Configuration Management together with git-flow [duplicate]

Using multiple branch/developers strategy for developing features causes some issues with built-in Drupal configuration management. Our scenario is the following: Create new feature and export ...
2
votes
1answer
694 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/...
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....
2
votes
0answers
1k views

Upload to private directory [closed]

I'm trying to setup a private folder for part of the files I need to make available in my Drupal 8 install and I'm having some trouble. My public files are being served with no problem in sites/...
2
votes
3answers
90 views

Session is not getting maintain in settings.php drupal 7

I have Created one php file on root of drupal7 and access it using URL.I have one form in that file which has dropdown values and submit button. Now in settings.php i am getting those value in POST. ...
2
votes
1answer
75 views

Distribute configuration to several sites

There should be several sites, starting with something like a similar distribution, but over time, each site might get some individual modules. Yet, I'd like to keep the site updated with new versions ...
2
votes
1answer
430 views

How to delete a variable during uninstall?

I've never run into this problem before, but the variable I set in my module won't delete during uninstall. What am I doing wrong? I set the variable in my module like this: variable_set('...
2
votes
1answer
136 views

logging in after exiting website under maintenance

i was installing updates for drupal website, while on maintenace mode. waited for updates to finish and then signed out. i've been trying a lot of things i'm reading online and it doesn't work. on ...
2
votes
1answer
166 views

Configuration Management Module Keeps Saying 'needs attention'

I've just started using the configuration module to keep my Drupal database in sync between my development and live environments. Documentation for this module is sparse, and I'm trying to understand ...
2
votes
0answers
1k views

How to optimize the unserialization of “variables” cache value

As we all know, the whole variable table is being cached in the drupal cache system and is being extracted into global $conf variable in each invoke. In one of our production site with the domain ...
2
votes
1answer
448 views

Correct Syntax for $conf to populate Varnish Control Terminal

This may be more a php question, but pertains to Drupal, so here goes: I'm trying to configure Varnish Control Terminal to use multiple hosts using settings.php. I have: $conf['...
1
vote
1answer
1k views

Drupal 8 Configuration API - cant access variables

I have made a simple example to practice using the configuration api in drupal 8. I created the following twitter_pull.credentials.yml file in the config/install folder: oauth_access_token: "12345" ...
1
vote
2answers
1k views

Ajax submission leads to => An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (2 MB) that this server supports

So i'm trying to submit a form using ajax, in my form i have the following: $form['actions']['#type'] = 'actions'; $form['actions']['submit'] = array( '#type' => 'submit', ...
1
vote
3answers
3k views

How can I create a variable with different values for each domain using Domain Access?

I have a numeric value that is unique to each domain (using Domain Access) on my site. I'd like to use the same variable name so I can use the same theme and display this value on all domains. Is this ...
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.
1
vote
2answers
580 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 ...
1
vote
2answers
421 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....
1
vote
3answers
379 views

Can a theme leverage block config Yaml files when installed for the first time?

In my Drupal 8 contrib theme, when the theme is first enabled, a number of system blocks are dumped into the first region that's in my theme's info.yml file. From a UX perspective, this is not really ...
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
vote
1answer
703 views

How do I handle third-party API credentials in settings? [closed]

I am building a module that will need to integrate credentials for the 3rd party service in Drupal 8. The module's admin panel should remember the credentials and use them to interact with the service,...
1
vote
2answers
437 views

Easy way to copy drush vget variables from one site to another site?

I have a bunch of vget variables to copy over to another dev site. What is an easy way to do this? I'm able save it to a file via "drush vget | ack var_name > myfile", but how would i do a drush vset ...
1
vote
2answers
447 views

Adding script conditionally

In the module I am developing I need to add script which require jQuery.The will be added depending on configuration settings. Hence I am using template_preprocess_module(&$variables) where I am ...
1
vote
1answer
57 views

Is there a recognized practice for keeping security details in files excluded from version control?

As settings.php also contains the database connection details and the site key among others, it is excluded from version control in .gitignore. But there some modules, APC for instance that require ...
1
vote
2answers
307 views

How do I set a variable in the install profile to enable users to sign up for the website

I am trying to understand about how setting variables works in install profiles. As an example, how would I set the option to enable people to create a website for the account in the install profile? ...
1
vote
1answer
593 views

Multiple Drupal sites using the same code base

Is it possible to use the same Drupal code base for different Drupal sites, just by changing settings.php and the database settings, and accessing it through a subdomain?
1
vote
2answers
688 views

Programmatically set the front page per site?

I have a site that is using a 'fake' multi-site instance (I think, someone else implemented it). We created 3 directories in sites: sites/site1 sites/site2 sites/site3 and in each settings.php ...
1
vote
1answer
369 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
59 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/...
1
vote
2answers
465 views

Remove default configuration on uninstalling module

During install we create content types, field storages and vocabularies. When uninstalling none of these things are uninstalled. I know that we can set all the configuration to have the module as ...
1
vote
1answer
41 views

Is Settings::set() a valid function?

Can I set value like Settings::set('some-variable','hello')? As if we can get value using Settings::get('some-variable') then why the 'set' method is not working?
1
vote
4answers
445 views

How to define settings from an install profile

I am looking for the way to set some settings at the install step. function genius_profile_final() { // Enable default permissions for system roles. $filtered_html_permission = ...
1
vote
2answers
1k views

Programmatically changing the global site name?

I'm making a multi-site setup using the same install and the same database, basing it off domains. I'm trying to programmatically alter the site_name variable so that it displays a different site name ...
1
vote
3answers
376 views

Exporting custom configurations from Drupal

After installing a Drupal7 site, I have made several configurations/customizations over time. Now I would like to export them somehow, in order to load them to another site. But the problem is that I ...
1
vote
2answers
402 views

db_query to drupal variable

I have a the following query: function background_audio_file_query($path) { $result = db_query("SELECT uri FROM `file_managed` WHERE `filemime` = 'audio/mpeg' LIMIT 1 , 30", array(':...
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
49 views

How to sync configuration between multiple developers' environments

D8 Configuration management is really awesome and easy to use when there's only one developer working on a project. We are running into challenges in keeping configuration synced between environments ...
1
vote
2answers
455 views

Why is it possible to write any string in the hash salt

I have researched a bit, but could'nt find a precise answer to why you can write any string in $settings['hash_salt']. For me it does'nt make sense that the site chashes if no hash salt has been set ...
1
vote
1answer
585 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
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 ...
1
vote
2answers
2k views

Connecting to a remote database in D8

I have the following params in settings.php to connect to an external database . $databases['d8243']['default'] = array ( 'database' => 'drupal8', 'username' => 'root', 'password' => '...