Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [configuration-management]

Managing configurations across environments is part of the configuration management.

0
votes
1answer
47 views

Feature revert deletes existing Strongarm variable

I got a Drupal 7 feature, which contains certain Strongarm variables, such as admin_theme. This feature has been created, released and reverted multiple times, always without fault. Suddenly, the last ...
1
vote
1answer
34 views

Is it possible to organize template files?

As I've gotten more familiar with Drupal, I've been utilizing template files more and more. However, the naming conventions for template files make them difficult to organize. Is it possible to ...
1
vote
2answers
715 views

Should I define all my variables in the module.settings.yml file?

With the new Configuration Management System we can create a module.settings.yml file with all the variables that we will use in our module. Now just to made a test I delete all the content inside ...
5
votes
1answer
696 views

When to use mapping or sequence to define an array in a schema file?

I need to define an array in my onlyone.settings.yml file to store this values: onlyone_node_types: book: book test: test In my onlyone.schema.yml file I have this: module.settings: type: ...
1
vote
1answer
56 views

Feed content type field with configuration value

I have a config form with several config variables where i save some user preferences like «position» or «weight» Now, at the moment of generating a content type i want to feed a select field with ...
1
vote
0answers
17 views

How do I store editor-configurable snippets of configuration?

The Drupal 8 site I'm building contains some custom forms and pages. On those pages, bits information are inserted that must remain editable by the site editors. In D7, I would probably have used the ...
0
votes
2answers
75 views

Creating config schema file for mutable data

I have a custom module where I need to have a couple different types of configuration, both immutable and mutable. The immutable portion contains a feed URL for a couple different sites, so I have /...
1
vote
1answer
363 views

Cannot activate parameter cors.config

I am using the RESTful Web Services that is included in core of drupal 8.2.7. I need to activate CORS to be able to call the API from another domain. I put this configuration in this file: "core/lib/...
3
votes
1answer
620 views

Custom configuration forms: translation access denied

While creating custom configuration forms, I'm getting an access denied. But on the /translation page of the form only. Configuration form itself can be reached, filled and updated without problems. ...
1
vote
1answer
46 views

Restore missing main menu

I have managed to hide/lose the main menu bar - drupal 7.x. overview of work I was doing: I added mediaelements.js I began adding videos to the site with add content I attempted to make a Videos ...
0
votes
2answers
414 views

How to resolve the problems encountered when moving from local to server? [closed]

Which things do we need to be aware of and change when moving a site (in Drupal 8) from a local environment to a server? In Drupal 7 I would just copy the files, change the database settings in ...
0
votes
1answer
230 views

Enable rest resource resource when module installs

I have a custom rest resource I have created within my module: /** * Provides a Demo Resource * * @RestResource( * id = "custom", * label = @Translation("custom"), * uri_paths = { * "...
0
votes
1answer
147 views

Exporting Custom Menu Translation

Question: How do I export/import translation of Custom Menu Items I have a module that takes all the .po files for custom strings and then uses locale to batch import them. This works great. I was ...
3
votes
1answer
58 views

How do I get rid of a staged configuration import?

I have a staged import that I can't apply and I would like to get rid of it and be clean in my configuration management screen. How do I get rid of the staged import? Can I go to sync folder and ...
2
votes
1answer
135 views

Features and CMI Together

We are developing a single Drupal 8 site with a set of different features (content types, etc). The CMI approach is great for sharing config through git and importing/exporting on local, dev, stage, ...
0
votes
1answer
28 views

Where do I set the HTML that wraps a module's config $form inputs?

I am transferring a module from one site to another. All is well except the modules form (where I set settings, upload images, etc). On the original site this is nicely wrapped in a table with each ...
6
votes
1answer
92 views

How can I enforce maintenance_mode at all times in a specific environment?

In Drupal 7, we could override the $conf variables in settings.php to force a site (e.g. development) in maintenance mode. In Drupal 8, this has changed to $config, but the maintenance mode variable ...
6
votes
1answer
315 views

Configuration successful but never gets imported

I have some changes in core.entity_form_display.node.news.default. When I run drush cim -y it says it is successful but it actually never imports it. drush cim -y Collection ...
2
votes
0answers
235 views

Update schema.yml variable type: string to integer

I would like to update my module schema variable from string to integer. mymodule.settings: type: config_object label: 'Module settings' mapping: identity: type: string -> integer ...
2
votes
0answers
40 views

Configuration Management together with git-flow [duplicate]

Using multiple branch/developers strategy for developing features causes some issues with built-in Drupal configuration management. Our scenario is the following: Create new feature and export ...
1
vote
0answers
62 views

Creating config entities in a functional browser test

I am extending Drupal\Tests\BrowserTestBase to create a functional test which attempts to edit and save a config entity. Creating this via MyEntity::create($data)->save(); has weird effects: They ...
0
votes
0answers
72 views

how to uninstall table associated with module for drupal 8

I uninstalled drupal 8 migrate_example module but i still see the fields associated with migrate example module. How to remove it.
1
vote
2answers
330 views

How can I access block metadata from custom plugin instance?

Using the block_example module, I created two instances of the example_configurable_text block in the UI and would like to now access their underlying metadata, specifically uuids. By looking at the ...
0
votes
1answer
705 views

Variables / settings configurable in Admin UI?

I need a simple way to make some custom variables / settings configurable for an Editor in Drupal 8. They are not related to Drupal, only to the custom project. For instance, the editor shall be able ...
3
votes
1answer
908 views

Configuration changes that will not import?

I have some configuration that will not import. If I run drush config-import --preview I see the changes to be imported; I hit 'y' to import. When I run the same command, the changes are still there? ...
3
votes
3answers
568 views

How to create a field with hook_update?

I want to create a field with hook_update in my module. I have the following code that creates the configuration for a field_link field: $module_path = drupal_get_path('module', 'my_module'); $...
1
vote
2answers
814 views

configuration error directories not present

I am brand new to trying to create a web blog so I am hoping you can help me get started. I haven't been able to find answer online. My status report has this error. Configuration directories Not ...
0
votes
1answer
108 views

Show custom entity bundle field

I created an module polls and entity poll using Drupal Console I want to add default entity_type on installation. Currently I added only one field to it field_image. I created following files ...
1
vote
0answers
62 views

Rebuild config module

I have create file config in a module /custom /module_name /config /install /module_name.settings.yml this is ...
-1
votes
1answer
43 views

Custom action defined by config entity

I am currently creating a module that allows generating PDFs based on arbitrary entities (or at least nodes). Multiple templates can be defined as config entities. This part already works. I have the ...
4
votes
1answer
427 views

Development with git branches/ gitflow and new modules

I wonder if somebody found a solution for the following issue related to Drupal 8 development with Git branches: You work on a new feature in a local feature branch for that you activate a ...
1
vote
0answers
332 views

Change existing field definition

I have Drupal8 site where client suddenly wanted to change some field from 2 decimal scale to 3. To X.XXX that is. Now I'm aware that changing field definition when there's stuff in db is not ...
2
votes
1answer
1k views

How to load field configurations in code

I have defined fields using the UI, and some more fields using YAML files in my custom module, e.g.: The field storage is defined in field.storage.node.my_heading: langcode: en status: true ...
0
votes
0answers
19 views

Parse Configuration data [duplicate]

In what format drupal stores the data in config tables ? is it a json ? Can i parse it with a online json parser ? or is there any other method ? sample configuration data : a:10:{s:4:"uuid";s:36:"...
1
vote
1answer
2k views

Attempt to create a field body that does not exist on entity type node

I am getting the following error: Drupal\Core\Field\FieldException: Attempt to create a field body that does not exist on entity type node. in Drupal\field\Entity\FieldConfig->...
2
votes
1answer
479 views

TypeError on drush config-export

I've been receiving the following error message when trying to do a drush config-export command. However, I am able to successfully do the configuration export from the Drupal admin page (admin/config/...
1
vote
0answers
8 views

Why can I not see a field which depends on two other fields related by the OR operator?

I'm using the Conditional Fields module and I have a field that I can set while editing my custom content type. That field is dependent to two other fields which are related by the operator OR. The ...
1
vote
1answer
509 views

The “migration” entity type does not exist." error after switching site file structure

I am working on D6->D8 migration. We initially stared the site out using the [drupal-project](https://github.com/drupal-composer/drupal-project template), and I had my migration working. However, the ...
1
vote
0answers
332 views

How to use third party settings to store an array of values

I'm making a module and almost complete, but I can't seem to get third party settings to save. Here is my schema.yml: editor.editor.*.third_party.ckeditor_styles: type: mapping label: 'CKEditor ...
3
votes
1answer
72 views

Export only non-default config

drush config-export dumps my entire site config into files. What I want is to only export config which is non-default. ie. if I haven't changed my "automated cron settings" since installing my ...
1
vote
2answers
303 views

Remove default configuration on uninstalling module

During install we create content types, field storages and vocabularies. When uninstalling none of these things are uninstalled. I know that we can set all the configuration to have the module as ...
1
vote
2answers
402 views

How to import config and content using config import and hook_update_N

Background: I have config read-only setup on non-development environments. So all configurations (including enabled modules) are created and exported from development site and imported to different ...
2
votes
1answer
46 views

Cloning a Drupal website without content

Drupal 8 ships with the new Configuration Management System. This system checks the sites UUID and only allows imports of configuration if the uuid is the same. This means, your steps to create a new ...
4
votes
1answer
122 views

Per entity settings storage (configuration / state / field)

Background : #2833770 : Save user configs to states Auto-logout saves the per-user settings using configuration API, which would obviously break with environment change and config deployment. The ...
0
votes
1answer
787 views

I have the following errors in my configuration page

I uninstalled a few modules. ~/apps/drupal/htdocs/modules$ drush pm-uninstall relaxed The following extensions will be uninstalled: relaxed Do you really want to continue? (y/n): y ...
2
votes
2answers
3k views

How to change default language for configuration entities

I made a mistake during development of my Drupal 8 site. Some time ago I changed the default language (to german) - but I continued to create the configuration entities (like fields and so on) in ...
1
vote
0answers
839 views

Drupal 7 install on Centos 7 - Forbidden You don't have permission to access … on this server [closed]

I installed Centos 7 (minimal) with LAMP stack on a dedicated development server on my home LAN as a development platform to migrate my Drupal 6 website to Drupal 7. Drush was used to install a new ...
0
votes
1answer
364 views

Drupal 8 Display True/False instead 0/1 on checkbox value in ConfigFormBase

By default the boolean fields' value displayed as 0/1 when user filled the checkbox field under custom configuration form. Need to render True/False instead of 0/1. $form['newfield'][$id]['required']...
1
vote
1answer
179 views

Revert configuration languages overrides

Suppose you have a Drupal 8 multi site installation, with multi language support, and a custom module used across multiple sites. This module has a view, with the yml file in: custom_module/config/...
3
votes
2answers
980 views

Custom Block in custom 404 node

I have a node. This node is set to be the 'Default 404 (not found) page' in admin/config/system/site-information I've got a custom block that I want to show within the node mentioned previous. I ...