Skip to content

Resolve error when deleting a media translation

I included the edit from @weseze on line 108 which reversed the order of the checks in the if() statement. That resolves the error that occurred when deleting a translation of a media item. Following the suggestion by @larowlan to check the entity language setting, I added a condition in the buildForm method to only provide the option to delete the associated file if the entity's language setting matched the site's default language setting. More information can be found in the README.md file. To get the most out of this module, be sure your file.settings contains the make_unused_managed_files_temporary key and set it to true. You can do this with the following drush command: cset file.settings make_unused_managed_files_temporary true.

Merge request reports