diff -u b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php --- b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -405,7 +405,12 @@ $args = array_slice(func_get_args(), 2); foreach (array_keys($entity->getTranslationLanguages()) as $langcode) { $translation = $entity->getTranslation($langcode); - foreach ($this->getFieldsToInvoke($translation) as $name => $items) { + // For non translatable fields, there is only one field object instance + // across all translations and it has as parent entity the entity in the + // default entity translation. Therefore field methods on non translatable + // fields should be invoked only on the default entity translation. + $fields = $translation->isDefaultTranslation() ? $translation->getFields() : $translation->getTranslatableFields(); + foreach ($fields as $name => $items) { // call_user_func_array() is way slower than a direct call so we avoid // using it if have no parameters. $result[$langcode][$name] = $args ? call_user_func_array([$items, $method], $args) : $items->{$method}(); @@ -415,33 +420,6 @@ } /** - * Gets fields based on the entity translation, to invoke methods on them. - * - * For non translatable fields, we have only one field object instance across - * all translations and it has as parent entity the entity in the default - * entity translation. Therefore field methods on non translatable fields - * should be invoked only on the default entity translation. The method - * returns for a default entity translation all the fields and for all other - * translations only the translatable fields. - * - * @param \Drupal\Core\Entity\ContentEntityInterface $entity - * The entity object. - * - * @return \Drupal\Core\Field\FieldItemListInterface[] - * An array of field item lists implementing, keyed by field name. - */ - protected function getFieldsToInvoke(ContentEntityInterface $entity) { - if ($entity->isDefaultTranslation()) { - $fields = $entity->getFields(); - } - else { - $fields = $entity->getTranslatableFields(); - } - - return $fields; - } - - /** * Invokes the post save method on the Field objects within an entity. * * @param \Drupal\Core\Entity\ContentEntityInterface $entity