When a file is removed in AMP Metadata, it appears that the file is removed sitewide, regardless if it is in use elsewhere.

Make sure to only remove the file from the system if it no longer in use.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mdrummond created an issue. See original summary.

RainbowArray’s picture

Status: Active » Needs review
FileSize
1.05 KB

This checks the usage of the organizational logo file before deleting. Pretty tricky to test this, as it would be a pretty rare thing to happen.

RainbowArray’s picture

Here's the D7 version of the patch.

mtift’s picture

Probably overkill, but I tested the D8 version by doing this:

  • Add a file
  • Check that the file was uploaded
  • Remove the file
  • Make sure file was remove
  • Add another file
  • Make sure new file is there

All good. Committed to 8.x-1.x.

mtift’s picture

Status: Needs review » Fixed

Did the same with D7. Committed to 7.x-1.x. Thanks, Marc.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.