diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index e2ca4dc..fa2c472 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -785,9 +785,6 @@ public function removeTranslation($langcode) { } } $this->translations[$langcode]['status'] = static::TRANSLATION_REMOVED; - if ($this->activeLangcode == $langcode) { - $this->activeLangcode = LanguageInterface::LANGCODE_DEFAULT; - } } else { $message = 'The specified translation (@langcode) cannot be removed.'; diff --git a/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php b/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php index 4100fdb..10ff66c 100644 --- a/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php +++ b/core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php @@ -71,6 +71,7 @@ public function getCancelRoute() { */ public function submitForm(array &$form, array &$form_state) { // Remove the translated values. + $this->entity = $this->entity->getUntranslated(); $this->entity->removeTranslation($this->language->id); $this->entity->save(); diff --git a/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php b/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php index c2211e3..b8ea366 100644 --- a/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php +++ b/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php @@ -107,6 +107,7 @@ function testEntityFormLanguage() { // Create a body translation and check the form language. $langcode2 = $this->langcodes[1]; $node->getTranslation($langcode2)->body->value = $this->randomName(16); + $node->getTranslation($langcode2)->setOwnerId($web_user->id()); $node->save(); $this->drupalGet($langcode2 . '/node/' . $node->id() . '/edit'); $form_langcode = \Drupal::state()->get('entity_test.form_langcode') ?: FALSE;