Problem/Motivation

Drupal's UI makes sure that the URI is unique by appending suffixes in the media library, this is not guaranteed on the Rokka metadata entities or file entities.

At least for Rokka metadata entities we can add this constraint to make sure that the relationship is unidirectionally unique, see #3197548: Metadata URI is not guaranteed to be unique (only one metadata entity is ever returned for a URI).

That leaves the case that for some reason multiple file entities reference the same Rokka metadata entity. In this case deletion of the file will check if there rae other URI with the same hash to make sure not to delete those but it does not check for multiple files.

Proposed resolution

Add this check.

Issue fork rokka-3197582

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grahl created an issue. See original summary.

grahl’s picture

Status: Active » Needs review
grahl’s picture

Issue summary: View changes

  • grahl committed de048e8 on 2.x
    Issue #3197582: Images are deleted if a URI is reused
    
grahl’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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