Questions tagged [configuration]
The configuration tag has no usage guidance.
819
questions
0
votes
0
answers
22
views
"The "MenuSettings" plugin does not exist - How do I remove it from the config?
after Updating my Drupal 8 to Drupal 9 (yes I know there is 10 already out) i can not edit or add new nodes.
Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException: "...
0
votes
1
answer
27
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
21
views
How to find bad tokens stored in config automatically?
I recently deleted some fields (media_term_fruits) and created new fields (media_fruits) on a local dev site. I then exported the config and pushed it to my dev server.
My dev server uses Github ...
0
votes
0
answers
21
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
13
views
Translate ajax form config
I have created a form where a user has the possibility to add as many section as he want (via ajax), each sectionhas a field (1 field to make it simple).
My question is related to multilingual website,...
0
votes
0
answers
26
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&...
0
votes
1
answer
52
views
Block Configuration Form Returning Unexpected Value
I'm trying to build a block configuration form. Here's my blockForm code:
public function blockForm($form, FormStateInterface $form_state) {
$form['resolve_ip_addresses'] = [
'#type' => ...
0
votes
0
answers
47
views
Why my custom module configuration are not getting created on module install?
I have created one custom module with config/install folder. This install folder contain content type yml. Basically on install of custom module new content type should be created.
When I use drush en ...
5
votes
0
answers
43
views
How do I import a sync config file into my Kernel unit test?
How do I import a sync config file into my Kernel unit test ?
Specifically, I have some REST resources in files
config/sync/rest.resource.foo.yml,config/sync/rest.resource.bar.yml
At present, when I ...
3
votes
0
answers
43
views
Where do you put install config translations?
I have a Drupal 9 site. When I export site config (drush cex) I get config/sync dir with settings and inside it I have i.e. language/de where translation config is stored. So translations are in ...
2
votes
1
answer
85
views
How to create configurable plugins under a plugin manager?
I have a custom plugin type and annotation. The purpose of it is so people can develop their own clients for an API integration, and tell the system which plugin to use to perform these actions. I am ...
0
votes
2
answers
72
views
Error about non-existing configuration
After trying to import configuration with drush cim it returns an error saying
The import failed due to the following reasons:
Configuration core.entity_view_display.contact_message.kontaktujte_nas....
1
vote
2
answers
80
views
Programmatically add new fields to content type
I have a custom module that has a form that allows the user to select various content types. I would like to create fields for those content types programmatically so that after the form is saved, it ...
0
votes
0
answers
39
views
How to import config to a site installed with a profile?
Good day. I’ve installed a profile, made my settings, entered my content, exported config and pushed everything to the repo. Now, when I clone it somewhere else and attempt to install using the config,...
0
votes
0
answers
37
views
Why does layout builder duplicate the body of a node after a full configuration import?
I used Layout builder for a site (Site A) using Drupal 9 and configured the Article content type to
Use Layout Builder and
Allow each content item to have its layout customized
This allowed me to ...
1
vote
1
answer
60
views
Correct schema for an Entity Reference in config settings
Background
I am creating a schema for a custom module's config settings, which are saved from a simple settings form. It has some basic fields, such as a checkbox for a Boolean value for hiding some ...
-4
votes
1
answer
163
views
Error importing configuration [duplicate]
[error] Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
The <em class="placeholder">language.content_settings.media.instagram</...
0
votes
0
answers
354
views
PluginNotFoundException entity type does not exist when trying to uninstall any module
I've got this drupal website from a client that the another developer created, and they've made a mess with many things in this site. I'm having a problem where every time I try to uninstall a module, ...
1
vote
0
answers
49
views
How to invalidate config or service cache
I have a service wich is loading a config at construct time:
class MyService {
public function __construct(ConfigFactoryInterface $config_factory) {
$config = $config_factory->get('my.config')...
1
vote
1
answer
58
views
How should we configure Config link on custom module?
I need to create Config link while enabling module. In routing file, I have mention the path name of config form, but its not directly show in the Configuration page. Below is my routing code.
...
1
vote
1
answer
70
views
How to temporarily override configuration?
I want to be able to contextually modify configuration variables, i.e. within a page controller.
Example
I have a custom ad module which besides other settings has an option to globally disable or ...
0
votes
0
answers
21
views
Getting possible values for a property in a config entity form
I've defined a custom DataType plugin which implements Drupal\Core\TypedData\OptionsProviderInterface.
I've also got a config entity type which defines one of its properties as being of this custom ...
1
vote
1
answer
79
views
Config sync & Field default value for entity reference fields
Given two environments dev & live, how do you properly transfer field default values for entity reference fields when deploying with Drush (cex & cim)? The default value is a UUID, which is ...
0
votes
0
answers
128
views
Import config on Drush install with config in non-standard directory
I've got a site set up with its config sync in a directory outside of web root; specifically ../config/sync (relative to the Drupal root). I have that path set for $settings['config_sync_directory'] ...
1
vote
1
answer
62
views
Custom theme settings not saving
I am in Drupal 9.3 and I am working to add 5 new fields to the theme settings. I am following all the instructions I can find. I have tried clearing caches a few times. I can see the fields. But ...
0
votes
2
answers
339
views
How do I create a configuration schema of type array?
I have a PHP array where an instance may look like this:
$mymodule_myarray = [
'first' => 0,
];
I want to have it represented and initialised as part of the configuration for the custom module &...
0
votes
0
answers
22
views
How to inherit Payment Gateway configurations?
I have a main payment gateway which I want to configure.
And multiple other payment gateways which I want to inherit the main gateway's configuration data.
I only have the CommercePaymentGateway ID (...
0
votes
1
answer
196
views
After installing webform, unable to use composer
The crux of this matter is that composer is now not working. I get the following when I try to run almost any composer command. (This Drupal 9 site is a composer installed site, and I would like to ...
0
votes
1
answer
17
views
Is the config object adapted to store datas from many users ( for the purpose of a subscription custom module )?
I have created a custom module that allows to subscribe to some news.
Each user ( and there will be thousands of them ) can register to some news category using that form
On form submit, the couple [...
2
votes
1
answer
102
views
Configuration import continues to list items as 'importable'
I am developing on a Drupal 9 site. I have found something a bit odd when running drush cim. There are a handful of configurations for which it DOES say there was a success, but when you run drush cim ...
2
votes
1
answer
36
views
Installing configuration from a module that is tracked in configuration on deployment
I am trying to install a module on a higher level environment. The module installs configuration in its config/install directory, and that configuration was also exported to the main site ...
0
votes
1
answer
330
views
Is it possible to programmatically change the config_sync_directory path after profile installation?
Installing Drupal 9 using a custom profile installation, I have defined "config_sync_directory" in settings.php file in $settings array to pick up the profile config during installation.
...
1
vote
1
answer
206
views
Set nested value in storable config
I have a settings form that saves site wide configuration information
My submit form function looks something like this
$data = [];
foreach ($groups as $key) {
$data[$key] = $form_state->getValue(...
0
votes
1
answer
741
views
There were errors validating the config synchronization
Locally I deleted custom block "CTA" from custom blocks and block types. Then I exported configs and created merge request. After merge is accepted, the pipeline runs commands on the dev ...
1
vote
1
answer
120
views
How to ignore block region placements during config sync?
When we perform config export and import our block placements are getting hosed. Is there a way to no export block placements/regions?
0
votes
2
answers
269
views
How to hide the fields in manage display when layout module is installed and display when module is uninstalled programmatically?
In the below config I want to remove the body field from content and add it in hidden as body: true when I uninstall the layout module.
Basically when I install the layout module the fields in manage ...
2
votes
1
answer
218
views
"Items in your active configuration have changes"
I'm trying to setup configuration management for our team, so i test the workflow on my local machine:
Starting from a fresh copy of our website + database backup, with an empty /config folder ($...
0
votes
1
answer
71
views
How can I programmatically add or remove a new request_path to block visibility?
It seems like I could utilize the getVisibilityConditions method on the block, which returns a ConditionPluginCollection object with a setInstanceConfiguration method, which is apparently easy enough ...
1
vote
1
answer
41
views
Adding sequence item to configuration
I have a configuration item in my custom module, part of which is a sequence, basically I'm attempting to create something akin to an array of items
my_module.schema.yml
my_module.settings:
type: ...
0
votes
1
answer
72
views
How to Install new module, add code to existing module that requires the new module, and import config for the new module in the same build
I seem to be running into a circular dependency issue in the scenario where my new build has a new module (B), new code in an existing module (A) that depends on the new module (B) and new config ...
0
votes
1
answer
59
views
How to prevent changing specific module installed status during config syncs?
I know there are methods for preventing specific configurations from being exported but how do you prevent specific module's installed/un-installed status from being exported?
For example, I'd like ...
1
vote
0
answers
197
views
Field Label Translation not working
I have a Drupal 9 site. The default language is English, second language is German. I keep having problems with translations in the backend. Lots of field labels and other text shows up in English, ...
0
votes
1
answer
751
views
Migrate PHP version - The "" plugin does not exist
I'm using Drupal 9.3.11 on PHP 7.3. Site is running perfectly. I need upgrade to PHP 8, but I am getting this error.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin ...
0
votes
0
answers
158
views
Webform Confirmation settings on form submission not working
I am using Acquia site studio components for web pages. In all the pages I have a pop-up with a webform submit button to enter to the site.
In Webform confirmation settings I have selected the option -...
1
vote
1
answer
112
views
"[message] => DB Error: no such table" error after installing civicrm
I installed CiviCRM 5.47.3 plugin using composer in the centos 8 server.
my drupal version is 9.3.5
After installing CiviCRM on the server CiviCRM plugin is enabled automatically in admin extension ...
0
votes
1
answer
46
views
How to create a configuration export such that it installs two modules, one of which has a dependency on the other?
I've written a custom module that uses jwt.transcoder service from the jwt module. In turn, it provides another service:
$ cat mymodule.services.yml
services:
mymodule.jwt:
class: Drupal\...
0
votes
0
answers
44
views
configuring backup migrate file name in settings file
Drupal 9.3.7, backup_migrate 5.0.1 --- On my dev machine, I've set the name for backup_migrate backup files in the config settings. When I export the database to my production machine, I'd like to use ...
3
votes
0
answers
20
views
How are the Ignored and Undefined config schema classes supposed to be used?
In Drupal\Core\Config\Schema there are two classes Ignored and Undefined, but they're empty.
How are they meant to be used?
4
votes
1
answer
325
views
Properly storing an array in a config object
In a config object, I want to store an array of values. The keys matter. The stored value is coming from a checkboxes element, so the array would look something like:
['article' => 'article', 'page'...
1
vote
1
answer
133
views
Add simple config object as a cacheable dependency?
I am building a custom breadcrumb that has some admin settings from a module in Drupal 9. When that settings form is saved, I want any breadcrumb cache that was built with this builder to be ...