Questions tagged as ['configuration']

Score: 0
config:import:single - Class 'Drupal\config\StorageReplaceDataWrapper' not found
cn flag

When I am trying to import a single configuration file within my multisite environment, I am facing the following error:

root@d655a4e6dc36:/opt/drupal/docroot# drupal --uri="" config:import:single --directory="/opt/drupal/config/sync/" --file="core.extensions.yml"

Error: Class 'Drupal\config\StorageReplaceDataWrapper' not found in /opt/drupal/vendor/dru ...
Score: 1
etb5115 avatar
How does the config sync directory work exactly?
co flag

I just had a question quick about how Drupal's config sync works. I work on a large Drupal site where I am having some coworkers joining in on working on the project. It's a version controlled site where we develop locally on Docker and then pull changes to a web server.

I recently discovered that Drupal has a "config synchronization" feature. If making changes to the site (be it views, blocks,  ...

Score: 0
pglatz avatar
Configuration inspector is reporting errors erroneously
in flag

I have a Drupal 8.9.19 I'/m trying to migrate to Drupal 9. I just did a status report, and have some configuration errors I'm trying to fix first. For example, this is from a view:


This view has a page 1 and attachment 1, but no page 2. Why is this being reported, and what can I do about it? Will it screw up my migration if it is ...

Score: -1
Not allowing the user to access the website within the given time period
ro flag

My client want to offline the site for 12:00 AM to 06:00 AM and show this message to users. How can I achieve this in drupal8

Score: 0
Multiple sites/default folders
cn flag

I have a Drupal 8 website on Docker containers. Drupal sites folders contains, besides the default folder, two folders, the settings.php file, and configuration.

The goal is to have different configuration inside each folder (inside each settings.php) and connected to same or different database.

Because client wants only one instance of Drupal (a single set of containers), how can I manage the website ...

Score: -2
What are the causes of the malfunction (The provided host name is not valid for this server) and how to fix it?
cn flag

My site stopped suddenly, with an error message

The provided host name is not valid for this server.

And even though I removed


Completely from the settings file and cleared the cache via Drush

drush cache-rebuild

also, i tried use this settings:

$settings['trusted_host_patterns'] = [ '.*' ]; and $settings['trusted_host_patterns'] = [];

but, the site still sh ...

Score: 1
Don't see Mail System under Configuration
eg flag

I'm currently going through the prerequisites of Acquias configuring platform email

but I do not see the Mail System to check what our default Mail System is. Does this mean We are using a different one? I do see Nemo Integration but still expected to be able to access Mail System.

enter image description here


Score: 1
Programmatically update field config (not storage)
ru flag

SOLVED, both methods below work perfectly fine, it was just a typo.

I need to programmatically update a field's config in hook_update. I need to do this on multiple projects, so I can't use the normal way with field UI and config sync. I've found documentation how to update the field storage and DB schema (1, 2), but no documentation how to update a field config only, so I assumed I can go along with co ...

Score: 0
Can't get field storage definition in custom entity
ni flag

I have a custom entity 'myentity' with some fields, and one of them is a taxonomy field with the next definition:

 $fields['colors'] = BaseFieldDefinition::create('entity_reference')
                ->setSetting('target_type', 'taxonomy_term')
                ->setSett ...
Score: 0
Naser Nikzad avatar
Is there any way to revert the changes done by "drush cim"?
us flag

I usually take backup of the entire database before importing new configurations, but this time I didn't and now I need to double check something with old version of database. Is it possible to just revert the changes done by drush cim?

I am using Drupal 8.

Googling for this specific situation didn't give me any solution.

Score: 1
hotwebmatter avatar
"The import is empty" errors validating config synchronization after core upgrade
nr flag

After Drupal 9 upgrade, I can no longer use configuration synchronization to deploy configuration to Acquia Cloud environment:

 Import the listed configuration changes? (yes/no) [yes]:
 > >  [error]  Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
> This import is empty and if applied would delete all of your configuration, so has been r ...
Score: 2
rickdenhaan avatar
How to use a module-relative path to translations in .info.yml
id flag

I'm new to using Drupal and am building a custom module to learn how it all works.

I'm building my module in modules/custom/my_module. I have a Dutch locale file in modules/custom/my_module/translations/

If I specify it like that in my .info.yml file, it works great:

name: My Module
description: Just testing
version: 0.1
package: Custom
type: module
core_version_requirement: ^8.8 || ^9 ...
Score: 2
Bisonbleu avatar
How can I capture a field’s configs and storage so I can delete it and then re-create it?
pl flag

I’m trying to implement this in a hook_update_N() but I’m not sure it’s proper (see excerpt below). Note I’m changing max_length in the process.

What I'm trying to do: update my_custom_entity.field_my_custom_field which has saved data into it. So I need to:

  1. Store that data
  2. Store the field configs - if that’s possible?
  3. Store the field storage - if that’s possible?
  4. Delete the field
  5. Create the f ...
Score: 0
David Lemon avatar
Using radio FormElement in a drupal 8 ListBuilder
ke flag

I made a custom configuration entity, and I'm trying to set up radio buttons in the listBuilder. This is done in the core module language without any problems, but when I try to do the same trick with my custom entity I can't get any radio button. Instead the attributes are rendered in the html element.

    public function buildRow(EntityInterface $entity) {
      $row['label'] = $entity->label();
Score: 3
mt.i.1 avatar
Exclude settings from a contrib module on export
us flag

I've two environment, dev and staging. I'm using the ReCaptcha module.

In the developpement environment, I have some api keys a other config which until now, are exported thanks to drush cex inside the recaptcha.settings file

site_key: mysite_key
secret_key: mysite_secret
verify_hostname: false
use_globally: false
  theme: dark
  type: image
  size: ''
  tabindex: 0
  noscript: false
_core: ...
Score: 1
Why is my split config not loaded with drush config:import?
am flag

I have a setup with different environments called prod and dev.

I need to distinguish API Keys and Urls between these two environments and thought that split-config would be the ideal solution for that.

What I have done so far:

  1. Created a split config for dev (not active!) because the default sync config should be for prod.
  2. Duplicated the configurations for the specific modules and changed the valu ...
Score: 0
Ex0r avatar
Proper usage of config_split
cn flag

I am trying to use config_split so we can ignore/disable some modules/configurations on our dev environments, and we don't want them to carry over to our production environments.

I think I am setting things up wrong, as whenever I make config changes on my dev and push things up to production and import, it's overwriting the settings on production for modules we are ignoring in config_split. (For ...

Score: -1
Jiah avatar
Configuration synchronization page throwing 504 timeout error
in flag

This issue is happening on every level above my vagrant local box. It's a brand new website and a few days back I had to copy my database from local to staging environment. Once done, I ran drush -cim to import the files from config/sync directory into the database.

no error while running the drush -cim command and also all the UUIDs match from local to staging environment. However, on loading th ...

Score: 0
How do I fix the "You're attempting to access the site via IP address or invalid hostname." error?
cn flag

I'm running Drupal 7 on Pantheon and have started getting the following error message whenever I try to save content.

You're attempting to access a Pantheon site via IP address or invalid hostname. Please use a valid hostname.

I've found a number of related issues online:

Score: 3
sea26.2 avatar
Remove Configuration Installer (v1.8)
om flag

I'm upgrading a site from Drupal 8 to Drupal 9. One of the projects that is deprecated and incompatible with Drupal 9 is Configuration Installer

The "normal" workflow (e.g., drush pmu <module_name> doesn't work - perhaps because this thing isn't really a module?) I can't simply remove the project with composer because then drush cim fails because it expects the code to be in the base.

It is li ...

Score: 4
baikho avatar
drush config-status on translation / language config files?
us flag

Similar with but not the same as How to use drush config:set for translations?, is there a way to scan for a site's language config changes via drush or so?

I have a lot of sites on the same server (multi-site), and I would rather check on this via a drush command than having to log in each of the sites to look at the output of /admin/config/development/configuration.

For normal config changes I could  ...

Score: 3
Extect avatar
Why does installing from an existing configuration fail?
cn flag

I am struggling to install a drupal site from an existing configuration. Here the two approaches I tried:

OPTION 1: Import the config by changing the UID:

  • drush cex on existing site
  • drush site:install to install new site
  • drush cset uuid 478e7e74-fea3...... to set UUID on new site equal to exisiting site
  • drush cim on new site


  The import failed due to the following reasons:

  Unex ...
Score: 0
Extect avatar
How to update a module in production?
cn flag

I am using git to deploy my composer.lock to production. Contrib is not part of my git repo. Therefore, in production I then run composer install to add contrib to production.

What happens when I update a module in dev via composer update, then deploy the updated composer.lock to production and run composer install there? Will it update/replace the existing module code or what is the best practice ...

Score: 2
How do I know which services.yml is active?
cn flag

If I have multiple services.yml in the sites/default/ directory, how can I determine which one Drupal is actually loading?

Is there a drush command to check this? Or is there some other way to verify which services file is being used by a site?

Score: 0
Extect avatar
How to deal with config changes in prod and by multiple developers?
cn flag

I have two scenarios in configuration management that I am unsure how to deal with:

  1. Geeky user makes config changes in production. What is the best practice to import these changes in dev without destroying the work that is being worked on in dev? git pull and drush cim would override everything you are working on in dev. I know there is drush cim --partial, but from what I understand this is not t ...

Score: 0
Extect avatar
With sites/default/files not part of the git repo, which content will be used in dev?
cn flag

I am using a composer managed Drupal install and want to use git to move it between development and production environments. From what I understand, the only directory that is not supposed to be in the git repo is sites/default/files. Everything else incl. modules, themes, composer files etc. would be in the repo. Composer would only be run in local dev, but not in production.

What I don't unders ...

Score: 1
hotwebmatter avatar
Configuration overrides have unpredictable results
nr flag

I'm setting up configuration splits with Drupal 9 and encountering unexpected results.

None of my splits are marked as Active in the active configuration or the exported configuration YAML.

I want to set the default Local split in settings.php and then use settings.local.php to override it on dev, stg, prd environments.

My local development environment is DDEV-Local v1.17.5. The three remote envir ...

Score: 0
Harv avatar
Permissions suddenly changed
jp flag

I've inherited a drupal 7.6 site with a broken css (styles were not loading). Here's what I've done so far:

-set sites/default/files, tmp and cache folder to 777. -flushed all caches

When this didn't work, I deleted the /files folder and created a new one which has done the trick.

I'm still getting "The file permissions could not be set on cache/normal/..." in recent log messages. in the cache folder,  ...

Score: 0
Options for storing API keys in config files?
in flag

I'm working on a project that's using Drupal Commerce and wondering about the possible options to secure the API keys exported as configuration YAML files.

We have the config directory outside of the web root and are fairly careful overall with security, but we currently have those committed to our private Git repository - should those be removed from the repository entirely, regenerated, and add ...