diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php index 74173ba00c..57f41fb1d6 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php @@ -76,8 +76,7 @@ public function settingsSummary() { $operators = $this->getMatchOperatorOptions(); $summary[] = t('Autocomplete matching: @match_operator', ['@match_operator' => $operators[$this->getSetting('match_operator')]]); - $match_limit = $this->getSetting('match_limit'); - $summary[] = $match_limit ? $this->t('Autocomplete suggestion list size: @size', ['@size' => $match_limit]) : $this->t('Autocomplete suggestion list size: unlimited'); + $summary[] = $this->t('Autocomplete suggestion list size: @size', ['@size' => $this->getSetting('match_limit') ?: $this->t('unlimited')]); $summary[] = t('Textfield size: @size', ['@size' => $this->getSetting('size')]); $placeholder = $this->getSetting('placeholder'); if (!empty($placeholder)) { diff --git a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php index a17472e9f6..f2d3eea6ca 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php @@ -102,7 +102,7 @@ public function testEntityReferenceAutocompleteWidget() { $assert_session->pageTextNotContains('Page test'); // Change the size of the result set. - entity_get_form_display('node', 'page', 'default') + $display_repository->getFormDisplay('node', 'page') ->setComponent($field_name, [ 'type' => 'entity_reference_autocomplete', 'settings' => [