Implicit deletion of the whole entity when deleting a translation

Created on 10 August 2018, almost 7 years ago
Updated 4 August 2023, about 2 years ago

Problem/Motivation

When trying to delete translations of a node, there are cases where you can delete the whole content (via the original version) even if you only wanted to delete a translation.

This will delete the whole entity, plus you may not even see it right away.

This may seem crazy but still happening to contributors. When manipulating content, using tabs, etc... You may end up getting back on a tab like that and think "Didn't i already deleted it? Well whatever...". But no one would suspect this to have an impact on the main content and all the translations.

What i think is happening : When you open the URL to confirm the translation deletion, Drupal detect from the URL that your translation exist and delete it. But when you open the URL with the languages prefix and the translation of this language has been deleted, then Drupal assume that you want to delete the main content.

Steps to reproduce

  1. Create a node and multiple translation.
  2. Go the the page that list content to display this new node and its translations.
  3. From this page, try deleting a translation openning it in a new tab (don't confirm yet).
  4. Do the precedent operation and confirm the form.
  5. Get back to the other tab and confirm the form (without refreshing the page).

Proposed resolution

When submitting the form to confirm the deletion, Drupal should prevent the user from deleting it if the translation does not exist in the node's translation languages. And display an error to the user so that he understand why nothing happenned.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Entity 

Last updated 2 days ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone

    I tested this on Drupal 11.x, using the steps in the issue summary and can confirm the problem still exists.

  • 🇩🇪Germany jmuxf

    I can confirm this in drupal 11

    While I did have an installation which worked correctly, I had to reinstall, and now deleting ANY translation always wants to delete ALL translations.

  • 🇩🇪Germany jmuxf

    I figured this one out. It happens when Account administration pages are activated and on top in "Interface text language detection". And it happens in Drupal 10 also. I don't know if this is a bug. But it is very confusing

Production build 0.71.5 2024