Is there any setting, function or option in this module (or File Entity) that handles cleaning up deleted files? If a user deletes several images from the library, for instance, and a few blog posts were using those images, would there be a way to execute a process that removes those [media] macros from the body of the blog for that file?

Upon initial delete, nodes using the macro for those deleted images just don't render anything - just a blank paragraph where the markup woudl usually go. However, visiting that page causes watchdog errors noting the inability for media to render the missing file.

Furthermore, if that node gets updated, saving it will cause the macro to start working again, but instead it renders the broken file image. In a WYSIWYG editor, it's difficult to remove this macro code after the file has been deleted.

It would be great if there was a universal cleanup option. I say option because normally I think most people would prefer the broken images to serve as reminders or placeholders for new replacement images.

However, in my case, I'd rather the site destroyed all reference and markup related to deleted images.

Comments

Chris Matthews’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team