Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

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

How can i Use drupal 8 CMI between two different sites?

I think, normally the CMI works between cloned sites, not different sites. Is there any way to do that with CMI ? or still we hardly depends the features module ?
1
vote
2answers
46 views

How to manage exported block configuration that site users can override?

Using core config management, we export configuration from developer's site instances and put than under version control. Eventually, this configuration is merged and ends up in production, where we ...
7
votes
2answers
2k views

How to export translated variables settings in code?

In a custom module I define several configuration variables by implementing the Variable module's API. The module is part of a multilingual site project, so some of these variables should be ...
2
votes
1answer
508 views

How can I exclude API keys, passwords, and so on from configuration management?

I am using Drupal 8 and drush cex to commit my configuration to my repository. However, I want to keep passwords and API keys out of the repository. How do I do that? (selectively exclude sensitive ...
1
vote
1answer
58 views

Sensitive data on configuration managment [duplicate]

How can I prevent some sensitive data (e.g. password for the SMTP module) from getting into my repo as part of the Configuration Management system?
4
votes
2answers
402 views

variable_get('var') VS $GLOBALS['conf']['var']

Let's say I set a variable in settings.php: $conf['var'] = foo; In my module or theme code, I can access this with either: variable_get('var'); or $GLOBALS['conf']['var']; Which is the preferred ...
1
vote
1answer
44 views

After moving Drupal 7 site, adding /user or /?q=user to base URL simply reloads maintenance page

I've just moved a Drupal 7 site from Bluehost to Inmotion (by reinstalling the latest core and adding the 'sites' directory from the old server account, then uploading the database). Since the move I ...
3
votes
1answer
1k views

For settings.php $conf, how can I tell what a variable in Drupal 7 is named in Drupal 8?

This article explains that using $conf in settings.php works differently in Drupal 8 compared to Drupal 7: The settings.php file could contain environment level overrides. Just remember how we ...
0
votes
0answers
25 views

Home page not fully rendered on godady

I uploaded a website to a Godaddy shared hosing account, but the home page never get fully render. I checked the PHP version and the extensions, also checked the file/folder permissions. The website ...
0
votes
1answer
412 views

How can I use configuration management to “snapshot” config on my dev server while I try new things out?

I was a heavy Features module user in Drupal 7 so I'm trying to use Configuration Management in Drupal 8 to recreate my old workflow. In Drupal 7, when I wanted to try making changes, I would: Add ...
1
vote
1answer
18 views

Changing drupal project folder breaks links

I have a drupal project working in the server home directory. I want to move this from the server home directory to a subdirectory to make way for other drupal projects. I move the whole drupal ...
0
votes
1answer
1k views

how to add mysqli driver to drupal 8?

$databases['default']['default'] = array ( 'database' => 'baba', 'username' => 'abab', 'password' => 'abcbc@', 'prefix' => '', 'host' => 'localhost', 'port' => '3306', '...
8
votes
2answers
383 views

Why is settings.php in the web folder?

In the default installation, settings.php is located at sites/default/. There are no recommendations in the official Drupal website about changing the location of this file. Doesn't it pose a ...
2
votes
1answer
882 views

Should the Drupal 8 sites/default/files/config folder be stored in git with its hash suffix?

New question title: "Should the sites/default/files/config folder be stored in git with it's hash suffix?" " Reason I ask this is that this might cause 2 issues: May be a hindrance when comparing ...
1
vote
2answers
304 views

Get configuration settings not working

I am writing this Drupal 8 module. I am setting up some configuration settings here But when I retrieve it here using $this->config()->get() it is not giving anything. Any idea what am I doing ...
0
votes
2answers
27 views

Dev version connects to the live site database despite settings.php

I've made a dev copy of the site to perform some tests and bug fixes: copied site files to the separate directory copied database under the same user, so I'm able to see both DBs in the phpmyadmin ...
2
votes
1answer
18k views

Database problem after moving the site: unknown server error

I just moved my site onto the server and put it under /drupal_test directory. I now have got an error in the browser, but there is no errors in the apache error log: PDOException: SQLSTATE[HY000] [...
2
votes
1answer
504 views

How to add a view dependency to a Drupal 8 functional test

I'm working on a contrib module port to Drupal 8 and am currently adding additional test coverage (#2586125). The module provides both a field formatter and a views style plugin. I have good working ...
0
votes
1answer
125 views

Is there a way to import Drupal variables into a the twig template?

I save a configuration setting using the following code. $config = \Drupal::service('config.factory')->getEditable('report.settings'); $config->set('id', $values['id'])->save(); Is there a ...
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 ...
0
votes
1answer
926 views

Bash script to configure the database for a drupal site install not working

I have a bash script that I want to use to be able to configure a drupal site without having to go through the browser screens. My setup is using XAMPP on MAC OS X with PHP Directory for my files ...
1
vote
2answers
61 views

Resetting a configuration object to “factory settings”

My module defines a configuration entity (specifically a BBCode tag macro with a template) that can be created and edited with a web form. It can also be created by other modules using a config/...
3
votes
2answers
167 views

What's the “Best Practice” approach for disabling secure pages on local Dev? [closed]

Wondering what the "best practice" approach would be for disabling secure pages on local dev. I'm running a site on Acquia Cloud and have access to the environment variable AH_SITE_ENVIRONMENT and I ...
0
votes
1answer
4k views

PDO Error, __construct(): php_network_getaddresses: getaddrinfo failed:

I'm pulling a site from my production server down to a new development server that I'm setting up. I can't get this to work though unfortunately. I imported my database into mysql and made sure that ...
3
votes
1answer
2k views

Are there any pitfalls pointing config sync to profile's config/install?

Is this good practice? I have pointed my config sync to: $config_directories['sync'] = 'profiles/PROFILENAME/config/install'; Experiments with drush cex have worked, allowing a cycle of UI changes, ...
0
votes
1answer
463 views

Unable to export and import custom block type fields

I have created a new custom block type and added some fields to it. I am able to export and import the custom block type in another Drupal instance via configuration management, but there are no ...
1
vote
1answer
3k views

How to get php error logging working properly in a production site

OK, I'm clearly missing something about how error logging is supposed to work. This is a D7 production site, so my goal is to get errors written into a log file, but not show up on the screen. I've ...
0
votes
1answer
546 views

Changing upload_max_filesize inb Drupal 7

Is there any way to change php's upload_max_filesize setting from settings.php in Drupal 7? This used to work for me in Druapl 6 but no longer seems to. I don't like the idea of doing it in .htaccess, ...
1
vote
1answer
201 views

Cannot redeclare drupal_get_hash_salt()

I had a site and it was running fine on the live server but when I moved it to my local server it gave me this error. Fatal error: Cannot redeclare drupal_get_hash_salt() (previously declared in D:\...
0
votes
2answers
162 views

Setting php E_NOTICE within my .module file

I want to set E_NOTICE only within the .module files which I create. How can I do it? I want to catch mis-spelled variable names which are difficult to catch.
0
votes
1answer
387 views

Hosting Multiple Domains seamlessly with same site code, theme, modules, data etc. not a multisites situation!

I would like to use D7 to support two domains with same code, themes, modules and even database and content, completely transparent to the end-user. So, user of oxustech.com would see only oxustech....
1
vote
1answer
446 views

Conf_path is deprecated but what is its replacement?

Im upgrading a D7 module to D8 and it turns out conf_path() is deprecated but I cant find the replacement. I found a github page that said use this DrupalKernel::findSitePath(Request::...
2
votes
1answer
124 views

append settings.php during profile installation

I would like to add lines to my settings.php during my custom installation. I'm using some $conf['...'] to match external content to my drupal and i would like not to do this by modifying directly the ...
2
votes
1answer
44 views

Persistent variable (`variable_set()`) name restrictions

Are there any restrictions, conventions, etc. for the names of persistent variables created with variable_set()? Aside from project name prefix, I haven't found anything in the documentation. However,...
0
votes
1answer
299 views

Programmatically re-order role weights?

I want control over the order in which roles' columns are displayed on the Permissions page.. I want to add code to my module installation file so that, after newly-configured roles' yaml settings ...
2
votes
4answers
2k views

Unable to save variable(s) from a custom form

I want to create a custom form with a few textfields and then use variable_set to save those textfields as variables. I am not able to save the variable with the code below. Question: I do not see ...
4
votes
1answer
593 views

Bandwidth Optimization options locked

I'm running a largely default Drupal 8.0.0-RC2 site. At /admin/config/development/performance the "Bandwidth Optimization" settings for "Aggregate CSS Files" and "Aggregate Javascript files" are ...
5
votes
2answers
622 views

Configuration management sync vs active vs staging

The documentation on config management talks about a CONFIG_SYNC_DIRECTORY setting, but then there is also mention of CONFIG_ACTIVE_DIRECTORY and CONFIG_STAGING_DIRECTORY setting throughout comments ...
2
votes
1answer
213 views

Practical staging of config

I am successfully migrating at least the bulk of my config from dev thru stage to prod. But the process could obviously be more robust. Current procedure: create central (bare) repository create ...
0
votes
1answer
2k views

How variable_get and variable_set works in drupal [duplicate]

How do variables work? Is it as simple as using variable_set('myvar', 'my_value'); to set, and variable_get('myvar'); to retrieve? Additionally, where are these variables stored, and do they have ...
6
votes
3answers
1k views

How to add the configuration changes from a website to another website?

This is what I'm trying to do: I have a website A where I make configuration changes and add other stuff. Now I create a website B. I would like to add the configuration changes from website A to ...
1
vote
0answers
771 views

Drupal redirects to site.local/install.php

I was working on my branch this morning tweaking some CSS when all of a sudden my Drupal site went into a dead mode. I am running multi site mode and the local.settings.php in the individual sites is ...
2
votes
1answer
4k views

My site thinks it's a new install [closed]

I had an error (related to Date module I think? Can't remember.) on my site so I tried to do an update. Caused a WSOD so I svn reverted. Didn't help. Manually disabled each module in the database. ...
0
votes
1answer
101 views

How often is settings.php called? And is $user available to it?

I'm thinking about adding some handling to the settings.php code, to set the ini_set('session.gc_maxlifetime', 2880); value based on the role of the logged it (or not logged in) user. i.e. for admin ...
3
votes
2answers
758 views

Why does simpletest report a missing schema for my Drupal 8 module?

My module is working as expected with the following settings, config and config export. But when I try to run tests, I get the following error. I'm not sure what is wrong. Drupal\Core\Config\...
0
votes
1answer
133 views

How to set views configurations settings on custom module install?

I have a custom module. On its installation I want to set some configuration settings of views like: ui.show.master_display ui.show.sql_query.enabled to TRUE. For this I have added a file ...
1
vote
1answer
36 views

why does drush tag 8.0.0-beta14 returns all zero for config core.extensions

After a fresh install of d8 with several core modules activated (block, breakpoint, database logging, field, filter, internal page cache, node, system, toolbar, update manager, user, views, views ui), ...
1
vote
1answer
194 views

What are dependencies in the context of a user role in Drupal 8?

In the process of wrapping my head around Drupal 8's configuration system (which is awesome, by the way), I came across this: YAML file (from core/modules/user/config/install/user.role.authenticated....
0
votes
0answers
39 views

How to prevent invalid config from being saved?

I want the site email address to be located at the same domain as the website. If an email address with different domain is provided such value should not be saved into config. I have taken care of ...
0
votes
1answer
40 views

Where does the variable for the left sidebar get set in Drupal 6?

I have a Drupal 6 site where I've added a submenu for a new set of products: products -old products set 1 -old products set 2 -new products set --new product 1 --new product 2 --new product 3 that ...