October 2021 update:
In early Drupal 8.x (back in 2014), they've implemented config dependencies with https://www.drupal.org/project/drupal/issues/2080823. Here's an excerpt from the respective change record:
Description:
Configuration entities can depend on modules, themes and other configuration entities. The dependency system is used during configuration installation to ensure that configuration entities are imported in the correct order. For example, node types are created before their fields and the fields are created before their field instances.
Dependencies are stored to the configuration entity's configuration object so that they can be checked without the module that provides the configuration entity class being installed. This is important for configuration synchronization which needs to be able to validate configuration in the sync directory before the synchronization has occurred.
At a later point, in 2015, they've implemented "enforcing" of dependencies with https://www.drupal.org/project/drupal/issues/2224581. Change record here. So a config file in Drupal may look like so:
dependencies:
config:
- field.storage.media.field_media_image
- media.type.image
enforced:
module:
- media
module:
- image
theme:
- bartik
Original issue summary
From @quicksketch in https://github.com/backdrop/backdrop-issues/issues/1811
I love the idea of importing a whole site into a fresh environment, and having it automatically download and install the needed modules. That would be slick! But first, let's fix this part so that config files know which modules they need.
This also makes me wonder if the config files should have a list of dependencies, rather than a single module. e.g. a _config_dependencies
entry rather than just _config_module
. Then module extending config files (e.g. the node.type.*
config files) could do something like:
$config = config('node.type.foo');
$config->set('my_module_setting', 'foo');
$config->addDependency('my_module');
$config->save();
Then importing the content type config file would know it needs not just the node module but also the extending module(s). Right now we don't actually track this at all, so we have no idea that a module that extends an existing config file would also be needed.
Recent comments
Hello, @yorkshirepudding! Thanks a lot, I got it, all sorted out.
My layout template (layout--blog.tpl.php) doesn't work
Hi @Gnome and welcome to Backdrop When I create custom layout templates I put them in /layouts/custom/my_layout Note: you can split modules and layouts between contrib and custom...
My layout template (layout--blog.tpl.php) doesn't work
This post explains how to do this in Drupal 7. In Backdrop, File Entity is already part of core. You will need to download and install module Views Field View. https://drupal.stackexchange...
I Need to Display an Image in a View that was Uploaded to a Webform