The website encountered an unexpected error. Please try again later.
Error: Call to a member function label() on null in Drupal\synonyms\Element\SynonymsEntityAutocomplete::valueCallback() (line 74 of modules/contrib/synonyms/src/Element/SynonymsEntityAutocomplete.php).
h2.Steps to reproduce
* Configured entity_reference field widget to use Synonym Friendly Autocomplete with default settings at path /admin/structure/types/manage/article/form-display
* Save form
* Navigate to /admin/structure/types/manage/article/fields/node.article.field_tags, observe error.
The website encountered an unexpected error. Please try again later.
Error: Call to a member function label() on null in Drupal\synonyms\Element\SynonymsEntityAutocomplete::valueCallback() (line 74 of modules/contrib/synonyms/src/Element/SynonymsEntityAutocomplete.php).
Drupal\synonyms\Element\SynonymsEntityAutocomplete::valueCallback(Array, , Object)
call_user_func_array(Array, Array) (Line: 1255)
Drupal\Core\Form\FormBuilder->handleInputElement('field_config_edit_form', Array, Object) (Line: 972)
Drupal\Core\Form\FormBuilder->doBuildForm('field_config_edit_form', Array, Object) (Line: 1042)
Drupal\Core\Form\FormBuilder->doBuildForm('field_config_edit_form', Array, Object) (Line: 1042)
Drupal\Core\Form\FormBuilder->doBuildForm('field_config_edit_form', Array, Object) (Line: 555)
Drupal\Core\Form\FormBuilder->processForm('field_config_edit_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('field_config_edit_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment | File | Size | Author |
---|---|---|---|
#2 | 2822443-default-value-null-2.patch | 1.32 KB | bucefal91 |
Comments
Comment #2
bucefal91 CreditAttribution: bucefal91 commentedIndeed there is a bug. Thank you for reporting these issues. I hope Synonyms module will pay off you in future :)
I am attaching the patch.
I'll commit it straight away since today I'd like to tag an alpha release. The patch does eliminate the bug as I tested it.
Comment #4
bucefal91 CreditAttribution: bucefal91 commentedCommitted.
Comment #6
devad CreditAttribution: devad as a volunteer commented