diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php index 5f7ce3c143c37f733a9617670ad0392b3e6d30e2..dfb3c08afb6d4d16bbdd8ab954d9bdcba023baa5 100644 --- a/core/lib/Drupal/Core/Field/WidgetBase.php +++ b/core/lib/Drupal/Core/Field/WidgetBase.php @@ -311,8 +311,6 @@ public static function addMoreAjax(array $form, FormStateInterface $form_state) * Generates the form element for a single copy of the widget. */ protected function formSingleElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) { - $entity = $items->getEntity(); - $element += array( '#field_parents' => $form['#parents'], // Only the first widget should be required.