Synonyms List Field Error: Call to a member function label() on null

Created on 26 April 2025, 19 days ago

Problem/Motivation

The error that occurs when the "synonyms list field" is active is as follows. When using select list, it affects the entire project.

Error: Call to a member function label() on null in Drupal\synonyms\Plugin\Synonyms\Provider\EntityReferenceField->getSynonyms() (line 82 of /home/pearls/web/d11site/public_html/test12project/web/modules/contrib/synonyms/src/Plugin/Synonyms/Provider/EntityReferenceField.php).

#0 /home/pearls/web/d11site/public_html/test12project/web/modules/contrib/synonyms/src/SynonymsService/ProviderService.php(63): Drupal\synonyms\Plugin\Synonyms\Provider\EntityReferenceField->getSynonyms()
#1 /home/pearls/web/d11site/public_html/test12project/web/modules/contrib/synonyms/modules/synonyms_list_field/src/Field/SynonymsFieldItemList.php(30): Drupal\synonyms\SynonymsService\ProviderService->getEntitySynonyms()
#2 /home/pearls/web/d11site/public_html/test12project/web/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php(34): Drupal\synonyms_list_field\Field\SynonymsFieldItemList->computeValue()
#3 /home/pearls/web/d11site/public_html/test12project/web/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php(43): Drupal\synonyms_list_field\Field\SynonymsFieldItemList->ensureComputedValue()
...
...
...
💬 Support request
Status

Active

Version

2.1

Component

List Field (synonyms_list_field)

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024