diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php index e9f5463..772730f 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php @@ -357,9 +357,8 @@ public function save() { )); } // Ensure this field UUID does not exist with a different ID. - // @todo Adding this dependency here might be bad. $matching_fields = \Drupal::entityQuery('field_instance') - ->condition('uuid', $values['uuid']) + ->condition('uuid', $this->uuid) ->execute(); $matched_field = current($matching_fields); if (!empty($matched_field) && $matched_field['id'] != $this->id) { @@ -368,7 +367,7 @@ public function save() { array( '@input_id' => $this->id, '@input_uuid' => $this->uuid, - '@field_id' => $matched_fied['id'], + '@field_id' => $matched_field['id'], ) )); }