New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't delete file from library #9774
Comments
Update, resolved: this file was the project logo. |
I hit the same error for the same reason, either the logo should be deleted or a nicer error be shown. |
Maybe it would be better to give more tips about the error instead of "Internal server error" |
This has indeed been brought up quite a few times, and technically a duplicate of #9507, so I'll proceed to close this 👍 |
Preflight Checklist
Describe the Bug
If i delete an image from library i get this error:
{ "errors": [ { "message": "delete from
directus_fileswhere
idin ('e9c5f419-f465-4548-8be9-42e5ec32e0f1') - ER_ROW_IS_REFERENCED_2: Cannot delete or update a parent row: a foreign key constraint fails (
directus-saccardo.
directus_settings, CONSTRAINT
directus_settings_project_logo_foreignFOREIGN KEY (
project_logo) REFERENCES
directus_files(
id))", "extensions": { "code": "INTERNAL_SERVER_ERROR" } } ] }
To Reproduce
Delete an image from library
Errors Shown
{
"errors": [
{
"message": "delete from
directus_files
whereid
in ('e9c5f419-f465-4548-8be9-42e5ec32e0f1') - ER_ROW_IS_REFERENCED_2: Cannot delete or update a parent row: a foreign key constraint fails (directus-saccardo
.directus_settings
, CONSTRAINTdirectus_settings_project_logo_foreign
FOREIGN KEY (project_logo
) REFERENCESdirectus_files
(id
))","extensions": {
"code": "INTERNAL_SERVER_ERROR"
}
}
]
}
What version of Directus are you using?
9.0.1
What version of Node.js are you using?
14.18.1
What database are you using?
MysQL
What browser are you using?
Chrome
What operating system are you using?
macOS Monterey (12)
How are you deploying Directus?
Locally
The text was updated successfully, but these errors were encountered: