Does not "Prevents deletion"

Created on 25 July 2024, about 1 month ago

The description of the module includes "Prevents deletion if the file is in use in other locations". Delete is not prevented. Am I missing something in the configuration?

πŸ’¬ Support request
Status

Active

Version

1.3

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States stephencross

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @stephencross
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    The module makes use of file usage data from core. There are known bugs with that API in core.
    The module also supports the more robust entity usage module. I would recommend using that if you can.

  • πŸ‡ΊπŸ‡ΈUnited States stephencross

    Thanks for the quick response. I have those modules installed and enabled. This module detects that media is being used and warns the user, but does not prevent deletion. Is this working as designed?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    So that warning is coming from entity usage module.

    Media file delete will allow you to delete it if there is only 1 usage but prevents if there is more than, whilst entity usage warns if there is more than zero.

    I would suggest that you:
    * triple check the usage - if there's only one usage and its on the media entity you're deleting - its all working - happy days
    * turn of entity usage delete warnings for media entities - looking at the code, it looks like this can be done from the entity usage settings form

    Let me know how you get on

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Oh and also, that warning is about usage of the media entity. This module doesn't have anything to do with deleting media - its to do with deleting the file attached to the media.

    So I think there's a disconnect there.

Production build 0.71.5 2024