Skip to content
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

Don't leave orphaned data on deleting Projects, Translation Sets or Glossaries #1846

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

pedro-mendonca
Copy link
Member

Problem

As described in #1845, when a user deletes a Project, a Translation Set or a Glossary, many orphaned data is left behind, forever.
Some of this happens because of a wrong data passed:

  • delete_many( array( something_id, $id ) ) (wrong)
  • delete_many( array( something_id => $id ) ) (correct)

Some of this happens because of a change in the codebase from a loop with delete childs to delete_many(), that is actually quicker, but left behind the child items.

Solution

Include these data deletions in the current delete() methods.

Fixes #1845

@pedro-mendonca pedro-mendonca marked this pull request as draft May 15, 2024 15:48
@pedro-mendonca pedro-mendonca marked this pull request as ready for review May 15, 2024 15:51
@pedro-mendonca pedro-mendonca marked this pull request as ready for review May 15, 2024 19:20
@pedro-mendonca pedro-mendonca changed the title Fix delete objects Don't leave orphaned data on deleting Projects, Translation Sets or Glossaries May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting items leaves orphaned data behind
1 participant