Skip to content

Deleting media with dependencies shows unfriendly message #20555

@NguyenThuyLan

Description

@NguyenThuyLan

Which Umbraco version are you using?

v17-beta, v16.3.1

Bug summary

Currently, when a user tries to delete a media item permanently in the Media Section that is still referenced in user group (ex: user start node), the application displays the raw SQLite error:
SQLite Error 19: 'FOREIGN KEY constraint failed'
This is not user-friendly and can be confusing. Users do not understand why the deletion failed or what action they should take.

Specifics

Image

Steps to reproduce

  1. Create a Media folder named 'My folder'
  2. Create a new user group, select media start node, choose 'My Folder', then click save.
  3. Go back to the Media Section, delete 'My folder' permanently
  4. You will see the error message: SQLite Error 19: 'FOREIGN KEY constraint failed

Expected result / actual result

Expected result: a friendly message like: Cannot delete this media because it is used in other sections. Please remove it from all playlists or references first.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions