Questions tagged as ['configuration']

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="3030-bronze-minnow-vuask4c0.ws-eu18.gitpod.io" config:import:single --directory="/opt/drupal/config/sync/" --file="core.extensions.yml"
Error: Class 'Drupal\config\StorageReplaceDataWrapper' not found in /opt/drupal/vendor/dru ...
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, ...
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:
display.page_2.display_options.fields.field_faq_category.settings.linked
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 ...

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

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 ...

My site stopped suddenly, with an error message
The provided host name is not valid for this server.
And even though I removed
$settings['trusted_host_patterns']
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 ...

I'm currently going through the prerequisites of Acquias configuring platform email https://docs.acquia.com/cloud-platform/manage/platform-email/platform-email-configuration/#associate-domain
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.
thanks
...
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 ...

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')
->setLabel(t('Colors'))
->setDescription(t(''))
->setRequired(FALSE)
->setSetting('target_type', 'taxonomy_term')
->setSett ...
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.
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 ...
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/my_module-0.1.nl.po
.
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 ...
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:
- Store that data
- Store the field configs - if that’s possible?
- Store the field storage - if that’s possible?
- Delete the field
- Create the f ...
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();
...
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
widget:
theme: dark
type: image
size: ''
tabindex: 0
noscript: false
_core: ...

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:
- Created a split config for dev (not active!) because the default sync config should be for prod.
- Duplicated the configurations for the specific modules and changed the valu ...
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 ...
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 ...

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:
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 ...
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 ...
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 sitedrush site:install
to install new sitedrush cset system.site uuid 478e7e74-fea3......
to set UUID on new site equal to exisiting sitedrush cim
on new site
RESULT:
The import failed due to the following reasons:
Unex ...
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 ...

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?
I have two scenarios in configuration management that I am unsure how to deal with:
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
anddrush cim
would override everything you are working on in dev. I know there isdrush cim --partial
, but from what I understand this is not t ...
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 ...
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 ...
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, ...

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 ...