Questions tagged [configuration]
Use this tag for questions about Drupal's configuration system.
860 questions
0
votes
0
answers
15
views
Duplicated config files
I have an issue with my site duplicating configuration files each time I perform an export.
settings.php contains the following sync directory configuration : $settings['config_sync_directory'] = '../...
0
votes
0
answers
25
views
Config export annoation not working
I have a config entity with the following config_export annotation.
* config_export = {
* "id",
* "label",
* "is_staging"
* },
The config entity ...
0
votes
0
answers
107
views
Site crashes with "Attempted to create, modify or delete an instance of field with name X on entity type Y when the field storage does not exist."
I apologize for the long post. I'm just trying to be thorough on what is happening and what I've tried so far...
For a while (at least six months) I've been having issues with my website crashing, ...
0
votes
0
answers
19
views
buildcacheid() error on login/submission
Here are some contextual elements :
Drupal 10.2.5 (contents (and users) where imported from a V7 drupal old site
Php 8.1.27
ldap_auth 8.x-40.3
All pages of the site are restricted to authenticated ...
0
votes
1
answer
46
views
Re-using existing field storage
I have an "article" node type, which has a list field article_type with 5 options.
When exporting the configuration, there are two config files:
field.field.node.article.field_article_type....
0
votes
0
answers
19
views
Ignore webform and wobform_options configuration during cex
I am using config_ignore and webform_config_ignore module in my drupal project but both doesnot seem to ignore webform configuration exports during lando drush cex.
Any way by which i can ignore ...
-2
votes
1
answer
49
views
How to hide local task if user has specific role [closed]
I am writing a custom module that adds a configImportForm with two options and I've assigned it to a user and given a specific permission - I want to disable the import / export tasks and just show my ...
0
votes
0
answers
58
views
Add field file for upload inside a custom field
Drupal 9.5.11
I have a Timeline component that uses three fields:
field_title
field_body
field_timeline
Field_timeline is a custom field with:
TimelineDefaultFormatter.php
Timeline.php
...
0
votes
1
answer
61
views
How to set configuration location on installation?
I'd like to use the configuration location above the webroot, $settings['config_sync_directory'] = '../config/sync'; in settings.php, as recommended by the documentation here, Changing the storage ...
2
votes
1
answer
301
views
How to prevent emails, api keys hashes, being stored in config and instead use a non-git controlled env-specific settings.php file instead for them
Background
I want to make my site code open source, for reasons of:
collaboration
developing an open source Drupal distribution or module (yes I know distributions might be superseded by recipes but ...
0
votes
0
answers
38
views
Installing CK Editor Media Embed fails
I'm trying to install the CK Editor Media Embed module for a client's Drupal 7 to Drupal 9 migration, since the old CK Editor 4 Iframe embedding doesn't seem to be available in Drupal 9.
I've followed ...
0
votes
1
answer
40
views
Configurable products with reference to simple products
I'm in the process of creating an e-commerce site for myself. I'm a Magento developer but decided to learn Drupal.
I'm struggling with a setup for configurable products. I'm able to create them in a ...
1
vote
1
answer
64
views
How can I override the search_api server host setting in settings.php?
My server is named "my_server." When I look at the keys in search_api.server.my_server.yml, I see...
backend_config:
retrieve_data: false
highlight_data: false
site_hash: false
...
-1
votes
1
answer
610
views
Installing Drush 12 globally
We're trying to install a global Drush 12 installation for a Linux Debian server hosting multiple Drupal 10 websites in different folders.
We've tried simply doing a composer require drush/drush in a ...
2
votes
1
answer
98
views
How to create third party settings for themes?
How to I properly implement third party settings for a theme, without clearing 3rd party settings from other modules?
E.g. my site has a gin.settings.yml with
third_party_settings:
shortcut:
...
1
vote
0
answers
103
views
Does anyone have suggestions or recommendations on how to integrate CKEditor 5 Full page HTML plugin successfully into a Drupal website?
I am exploring ways to implement the Full Page HTML feature of CKEditor 5 in Drupal. Does anyone have suggestions or recommendations on how to integrate this feature successfully into a Drupal website?...
1
vote
0
answers
65
views
How can I lint / audit / validate YML to avoid making stupid mistakes?
Is there a way to lint YML to ensure that the values are something that Drupal understands?
For example, I recently wrote this YML for a custom module:
config/install/mymodule.settings.yml
langcode: ...
0
votes
1
answer
51
views
Add fields to content-type when Theme is enabled
Is there any way we can change configuration items when we switch to a specific theme?
Our (simplified) situation:
Using Drupal 10.2
Our customers can choose between different themes
Every theme uses ...
0
votes
1
answer
108
views
How can I import staged configuration?
I'm trying to import configuration with drush cim. I'm getting
Rename operation for simple configuration. Existing configuration system.site and staged configuration domain.config.xxx.system.site.
I ...
1
vote
0
answers
38
views
Prevent certain config dependencies from being exported to a config file
I have a scenario where I want to import a baseline of configuration for hundreds of sites. New(er) versions of modules recently set permission callbacks to their entities. The problem is that these ...
0
votes
0
answers
55
views
What would cause config export (drush cex) to output to multiple folders instead of just config/sync?
settings.php has a single config sync setting:
$settings['config_sync_directory'] = '../config/sync';
Yet every time we run "drush cex" it writes the same config .yml files to three places:
...
1
vote
2
answers
166
views
Block config not saved apparently due to an enforced 303 status
After upgrading from 10.0 to 10.1.7, changes to block configuration were no longer saved.
I cannot reproduce this in an out-of-the-box instance. I've turned off all custom modules and as many of the ...
2
votes
2
answers
181
views
How can I have multiple module configs depending on environment?
I have a Drupal site that I build locally and pull to the staging and production servers using git. Normally, my workflow is to run drush cex to export the configs from local, and drush deploy to ...
0
votes
1
answer
458
views
'stale_file_threshold' is not a supported key [closed]
I have installed "Advanced CSS/JS Aggregation" on my Drupal 10.
but after installation, I faced a problem.
In performance page, when I want to save configuration (for example I checked/...
1
vote
0
answers
34
views
Unable to get $settings['config_exclude_modules'] to work - am I misunderstanding how it works? [duplicate]
Drupal 10 on Pantheon.
We have our settings.php file updated with this line:
$settings['config_exclude_modules'] = ['devel', 'stage_file_proxy', 'status_messages'];
This line exists locally and also ...
1
vote
1
answer
125
views
How to execute a drush command with an answer to a prompt
When I run drush it to sync up my taxonomy content, I am prompted to specify the style:
What import style would you like?:
[0] Full
[1] Safe
[2] Force
Is there a way I can include my answer to this ...
0
votes
0
answers
728
views
There were errors validating the config synchronization after changes to modules and config
After many hurdles, struggles, and "learning moments", I pushed my site to staging successfully. Unfortunately, I am running into numerous issues when I try to push updates to a deployed ...
1
vote
1
answer
921
views
How do I override settings.php for Symfony Mailer to use Mailhog for local development?
Now that I am supporting Drupal 10, I needed to set up Mailhog to allow local capturing of emails when I'm testing in my local Docker environment.
I used to use the SMTP and Mail System modules and ...
0
votes
3
answers
157
views
Is it possible to override config in settings.local.php by prepending/appending to the current value?
I have tried both of the following:
$config['my_module.default']['content'] = 'prepend ' . $config['my_module.default']['content'];
$config['my_module.default']['content'] .= ' append';
but the ...
0
votes
0
answers
93
views
Trusted host patterns problem, again
I need to set up trusted host patterns for 3 EC2 instances. They all share same base code, so they all use the "same" settings.php.
On my two (production) instances everything works fine:
...
0
votes
0
answers
42
views
Why does a custom matcher cause a linkit profile to be deleted on module uninstall?
In a custom module, I've set up a custom EntityMatcher in order to get suggestions for instances of my custom entity type in the linkit dialogue. This all works very fine.
However, when uninstalling ...
0
votes
1
answer
244
views
How to update migration field mapping using custom module/form?
I was learning about Drupal migration recently and found out that we can use Migrate Plus module to import migrations as configurations. Hence I started wondering if a migration is imported as a ...
0
votes
0
answers
78
views
Configuration synchronization
I am trying to import views from one of my Drupal 9 sites, we will call it Drupal A to another Drupal 9 site, we will call it Drupal B.
I keep getting this error:
Error message
The configuration ...
0
votes
1
answer
99
views
How to pass block instance configuration settings to TWIG template?
I've got a custom block plugin which has some configuration settings that can set from the block configuration form. How can I then access that configuration info later when the block is being ...
0
votes
1
answer
157
views
How to Save Configuration Data for Custom Block
I'm have a custom module that creates a custom block plugin, but am having trouble figuring out how to add some custom configuration settings to the block.
Just for understanding how to do this, I've ...
0
votes
0
answers
233
views
How to run drush cim command for importing all the configurations
I cloned the drupal project on my local.
I have a Docker desktop app.
so I run docker-compose up -d on command prompt.
docker-compose.yml:
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
...
0
votes
1
answer
211
views
Custom field type that has an array property won't save unless serialized, otherwise get "This value should be of the correct primitive type" error
I have a custom field type with two properties I am storing on it. One stores a string. The other I want to store an array. The array should be serialized in the field value table of the database, but ...
0
votes
1
answer
70
views
Install module with required config that may exist
I have a module that have some config in config/install folder, that require config that may already exist in the current config. So I placed those config under config/optional.
But if those config ...
0
votes
1
answer
43
views
is it posible to get the value of other fields right inside the buildForm() method without having to save configuration?
I have a config form with two select fields. The first one(vocabulary) gets populated automatically without problems with options taken from the available vocabularies for users to pick up one. The ...
0
votes
0
answers
384
views
How can you update a single configuration entity using drush?
Every now and then, if I try to import partial configs using drush, like
drush config:import --partial --source=stuff/is/here
drush seems to understand that some of these config entities exist in the ...
0
votes
2
answers
472
views
Config Export changes to different folder
Is it possible to export only the changed configuration files to a specified folder?
When you run drush cex to see the change list of files like this
+------------+----------------------+-----------+
|...
1
vote
2
answers
438
views
Enum class not found when trying to use it in settings.php
I defined an enum in a custom module:
namespace Drupal\my_module\Enum;
enum BuildType: string {
case Apple = 'apple_build';
case Orange = 'orange_build';
}
And I want to use it in settings.php ...
3
votes
0
answers
69
views
Can I use pseudofields in anything other than source?
If I use pseudofields in the source property for my custom plugin, they are correctly substituted with the computed values. If I use them in another configuration (as per the example), they are ...
0
votes
1
answer
31
views
Custom form, add admin editable instructions from settings area to form
I have a custom form that is working great. I'd like to add a field "instructions" right under the title, above the first form field. This "instructions" field is editable in the ...
0
votes
1
answer
66
views
Config split is imported only every second time of jenkins job run
I have some weird behavior with drush cim when running from a jenkins job.
It seems like a config split is only imported every second time or so when the job is run.
The update skript containing the ...
3
votes
0
answers
119
views
Enable a module with sample config that depends on a theme
I have a submodule that provides some prepared configuration via config/install. The goal is to have devs enable that module to get a preconfigured set of content types complete with preconfigured ...
0
votes
0
answers
37
views
Why isn't this configuration saving?
How do I do change configuration when there is a dash in the yml file?
The configuration is the following one.
source:
plugin: url
data_fetcher_plugin: http
data_parser_plugin: xml
urls:
- ...
0
votes
1
answer
112
views
Deleted context link still exists in admin toolbar menu
I have deleted context but in admin toolbar it still showing . On main context admin page context doesn't exists. I have installed/uninstalled module - not helping
How do i remove that link from ...
0
votes
0
answers
40
views
Can I change the autocomplete to a dropdown for the entity_browser module?
I'd like to be able to change the autocomplete for the Site Sections portion of the entity_browser module.
I'm not seeing any way to modify this within the admin. Am I missing something? Can I do this ...
0
votes
0
answers
43
views
How to import localized version of a configuration file
With drupal, you can import a single config file.
Let say it is a view config file and let say that this view has been translated in french and has produced a locallized config file under the "fr&...