Issue #3383131 by WalkingDexter, xjm, allisonherodevs, ashley_herodev,...
Issue #3383131 by WalkingDexter, xjm, allisonherodevs, ashley_herodev, pradhumanjain2311, smustgrave, marcoliver, lauriii: Entity autocomplete form element ignores entities with label "0"
(cherry picked from commit 68dfec3c)
@@ -92,6 +92,12 @@ protected function setUp(): void {
$entity->save();
$this->referencedEntities[]=$entity;
}
$entity=EntityTest::create([
'name'=>'0',
]);
$entity->save();
$this->referencedEntities[]=$entity;
}
/**
@@ -184,6 +190,11 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#tags'=>TRUE,
];
$form['single_name_0']=[
'#type'=>'entity_autocomplete',
'#target_type'=>'entity_test',
];
return$form;
}
@@ -211,6 +222,7 @@ public function testValidEntityAutocompleteElement() {
'tags_autocreate_specific_uid'=>$this->getAutocompleteInput($this->referencedEntities[0]).', tags - autocreated entity label with specific uid, '.$this->getAutocompleteInput($this->referencedEntities[1]),