diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php index 9cdc86effde..dc3783e87e3 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -951,7 +951,12 @@ protected function invokeFieldMethod($method, ContentEntityInterface $entity) { // what is going to be deleted - the whole entity or a particular // translation. if ($translation->isDefaultTranslation()) { - $translation->setIsDefaultTranslation(FALSE); + if (method_exists($translation, 'setIsDefaultTranslation')) { + $translation->setIsDefaultTranslation(FALSE); + } + else { + @trigger_error('Not providing a setIsDefaultTranslation() method when implementing \Drupal\Core\TypedData\TranslatableInterface is deprecated in drupal:9.4.0 and is required from drupal:11.0.0. See https://www.drupal.org/node/3376146', E_USER_DEPRECATED); + } } $fields = $translation->getTranslatableFields();