1

There's a new Drupal module that I'm interested in integrating in our websites, the Media Entity File Replace module. I've already installed it via composer and created an update hook to enable it across our different profiles, but the problem is exporting its yml configuration file. Step 3 of the module's Usage Instructions says you have to enable it in the Form Display settings of the media type you wish to use it on. In our case, we just want it on Documents media type.

I looked for the yml configuration under Entity Form Display and found that it updates this particular file: core.entity_form_display.media.document.default.yml

I run a search in my local Drupal branch and found that that file only exists in the Acquia Lightning Media contributed module (docroot/modules/contrib/lightning_media/modules/lighnting_media_document/config/install/)

How would I safely utilize the Media Entity File Replace Module without breaking a contributed module?

1 Answer 1

0

If you're using core's configuration sync to manage your site's config, you should be able to update this through the UI, then export your site's configuration to the sync directory, e.g. drush cex sync. This will create a new file in the config sync directory for the updated config which can be safely committed along with your other changes. While deploying, you'll need to import the synced configuration, e.g. drush cim sync to import the UI change on your second environment.

Configuration files in a module's config/install directory are only read from that location when the module is installed. That configuration file shouldn't change at all here and there's no reason for it to.

1
  • I'm trying to install a module that makes changes to a the document media type. I'll look into your suggestion. thank you.
    – kcsting
    Jun 23, 2020 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.