diff --git a/core/lib/Drupal/Core/Field/ConfigFieldItemList.php b/core/lib/Drupal/Core/Field/ConfigFieldItemList.php index 33b1137..5316e0d 100644 --- a/core/lib/Drupal/Core/Field/ConfigFieldItemList.php +++ b/core/lib/Drupal/Core/Field/ConfigFieldItemList.php @@ -16,7 +16,7 @@ class ConfigFieldItemList extends FieldItemList implements ConfigFieldItemListIn * {@inheritdoc} */ public function getConstraints() { - $constraints = array(); + $constraints = parent::getConstraints(); // Check that the number of values doesn't exceed the field cardinality. For // form submitted values, this can only happen with 'multiple value' // widgets. diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index 9dab1ea..0209be6 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -9,6 +9,7 @@ use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\EntityFormControllerInterface; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Field\FieldDefinition; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; use Drupal\Core\TypedData\TranslatableInterface; @@ -126,8 +127,8 @@ function content_translation_entity_field_info_alter(&$fields, $entity_type, $bu $field_settings += !empty($settings['content_translation']['fields']) ? $settings['content_translation']['fields'] : array(); } - foreach ($fields as $name => $translatable) { - if (isset($field_settings[$name])) { + foreach ($field_settings as $name => $translatable) { + if (isset($fields[$name]) && $fields[$name] instanceof FieldDefinition) { $fields[$name]->setTranslatable((bool) $translatable); break; }