- πΊπΈUnited States Chris Matthews
many users probably DO want the old file deleted immediately.
Yes, π―
- Status changed to Closed: won't fix
over 1 year ago 12:32pm 26 May 2023 - πΊπΈUnited States bkosborne New Jersey, USA
I'm concerned that the scope of this otherwise simple module being expanded too far. This issue is really about changing Drupal's behavior to immediately and automatically delete the old file, but that's only relevant when the functionality of this module is not used. I'd rather this be included in some other contrib module
- Status changed to Needs review
over 1 year ago 3:13pm 1 June 2023 - π«π·France matoeil
As previously said on #7 though:
- this module does not work as it should at the moment
- when doing replacement , the old file is never deleted , which causes data protection issues
- unless ['make_unused_managed_files_temporary'] = TRUE is set, which is highly not recommended because drupal core has issues with unmanaged files
-these core bugs have been on for 6years so it might not been fixed exactly tomorrow.may i leave your reconsider as deleting the file immediately would fix the problem?
- πΊπΈUnited States bkosborne New Jersey, USA
I think there may just be a misunderstanding of this module's purpose. This module enhances the media entity edit form to add an optional feature that allows files to be replaced. This is available via a checkbox. If the checkbox is checked, the original file is replaced with the uploaded version. If the checkbox is not checked, this module does nothing. It preserve's core's original behavior. The module is not attempting to do any more than this. I think you're expecting that the module will delete the original file, even if the checkbox to replace it is not checked? That's not the intent of the module.
- π«π·France matoeil
Thnaks for taking that time to reply.
I understand your point, but why absolutely wanting to preserve drupal core's behaviour when it is not working properly ?
That module could fill a Drupal flaw.Unless you do settings that are not recommended in production, that sentence is wrong :
"If unchecked, the filename of the replacement file will be used, and the original file may be deleted if no previous revision references it"The original file is never deleted !
In other words, for sites in production, the media entity file replace module does not work as it says it should.
- πΊπΈUnited States bkosborne New Jersey, USA
I think I assume that most people have
make_unused_managed_files_temporary
enabled, but considering core doesn't do that by default, I understand there's probably a large number of sites without that enabled. I personally have it enabled on the sites I manage because the tradeoffs of not having it enabled are worse IMO.Can I ask, why are you not using the checkbox to overwrite the original file? If you did, then you wouldn't have a problem, right? The old file is replaced and there's nothing to delete.
- π«π·France matoeil
The problem is the module leave to content editors of the site, that are not Drupal experts, to choose one option or the other, from one media to another, without understanding fully the consequences of it ( and without knowing how the site has been configured )
If the use of this module was to always overwrite the file , it would be better then to be configurable globally, and not left to the choice of the content editor on every media
- last update
11 months ago 3 pass I've updated the patch from #16 to apply to version 1.2. Nothing has been changed except to make that patch work against the new version.