I have lightning_media contrib module, and this module does have an export configuration file editor.edutor.rich_test.yml - now I have my own feature and I need to export the same config file, but if I export it I get CONFLICTS in my features!,
I wonder how to avoid this ?
or at least how to disable those config files in lightning_media ?
Some proposal solutions:

1) disable lightning_media (but has dozens of configuration)
2) add .gitignore but that's a dirty solution

I wonder if features has a functionality to exclude certain config files ?
thanks!

Comments

edutrul created an issue. See original summary.

mpotter’s picture

Category: Feature request » Support request

No, you wouldn't do either.

A "conflict" in Features is just a notification that the same *.yml is stored in two different features. But Drupal core doesn't care about this. Unlike in Drupal 7, configuration is not "live" in code...the active config is in the database. So all that matters is which config was last imported.

Config is imported when a module is installed, or when using config-import or features-import drush commands. As long as your module is loaded *after* lightning_media, then your config will take priority. You can ensure this happens by adding lightning_media as a dependency of your exported feature package.

We don't yet have any "Feature Override" mechanism in Drupal 8 (although see the config_override module for starting ideas). The "clean" way to override config in your own module is to write an update hook the loads the previous config, modifies it, then saves it.

If you want to "ignore" certain config in Features you can configure the Exclude assignment plugin in your bundle. But then Features won't manage that type of config at all and it won't show up in the UI to be exported. You'll just add the appropriate *.yml file to your module config/install folder manually.

mpotter’s picture

Assigned: edutrul » Unassigned
Status: Active » Fixed

FYI you only assign yourself to an issue if you are working on a specific patch for something.

Closing this as answered.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.