Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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 items with translations #13040

Closed
lluishi93 opened this issue Apr 28, 2022 · 0 comments
Closed

Can't delete items with translations #13040

lluishi93 opened this issue Apr 28, 2022 · 0 comments

Comments

@lluishi93
Copy link

lluishi93 commented Apr 28, 2022

Describe the Bug

A FK constraint is preventing the items to be deleted.

Potentially related to #12478

To Reproduce

  1. Create collection A
  2. Add translations field to collection A
  3. Create some items for collection A with its translations
  4. Try to delete the item

Errors Shown

{
  "errors": [
    {
      "message": "delete from `c_cta` where `id` in ('2149') - ER_ROW_IS_REFERENCED_2: Cannot delete or update a parent row: a foreign key constraint fails (`emma_pre_directus9`.`c_cta_translations`, CONSTRAINT `c_cta_translations_entity_foreign` FOREIGN KEY (`entity`) REFERENCES `c_cta` (`id`))",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ]
}

What version of Directus are you using?

9.9.1

What version of Node.js are you using?

16.14.0

What database are you using?

MySQL 5.7

What browser are you using?

Chrome

How are you deploying Directus?

Docker

@directus directus locked and limited conversation to collaborators Apr 28, 2022
@rijkvanzanten rijkvanzanten converted this issue into discussion #13044 Apr 28, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant