diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php index ccc1116..08a5252 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php @@ -85,7 +85,7 @@ public function getMatches(FieldDefinitionInterface $field_definition, $entity_t if (isset($string)) { // Get an array of matching entities. - $widget = $field_definition->getDisplayOptions('form'); + $widget = entity_get_form_display($entity_type, $field_definition->bundle, 'default')->getComponent($field_definition->getName()); $match_operator = !empty($widget['settings']['match_operator']) ? $widget['settings']['match_operator'] : 'CONTAINS'; $entity_labels = $handler->getReferenceableEntities($string, $match_operator, 10);