diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php index ac94c26..af4ebd0 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php @@ -61,7 +61,9 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // Make sure that deleting a translation does not delete the whole entity. if (!$entity->isDefaultTranslation()) { - $untranslated_entity = $entity->getUntranslated(); + // Clone the entity before deleting, as other methods will need to access + // the label and other data of the deleted translation. + $untranslated_entity = clone $entity->getUntranslated(); $untranslated_entity->removeTranslation($entity->language()->getId()); $untranslated_entity->save(); $form_state->setRedirectUrl($untranslated_entity->urlInfo('canonical'));