Will be fixed in referenced issue.
π Error: Call to a member function getName() on null in Drupal\bibcite_bibtex\Normalizer\BibtexReferenceNormalizer->extractContributors() Fixed
If a reference has a reference to a Keyword entity that has been deleted, rendering that publication as a citation causes a fatal error:
Error: Call to a member function label() on null in Drupal\bibcite_entity\Normalizer\ReferenceNormalizerBase->extractKeywords() (line 284 of modules/custom/bibcite/modules/bibcite_entity/src/Normalizer/ReferenceNormalizerBase.php).
This is due to the extractKeywords
method of ReferenceNormalizerBase
, which loops over the keywords reference field to extract all the keyword labels:
protected function extractKeywords(FieldItemListInterface $field_item_list) {
$keywords = [];
foreach ($field_item_list as $field) {
$keywords[] = $field->entity->label();
}
return $keywords;
}
If a keyword entity is deleted, the reference to it is not automatically deleted by Drupal core (see π Remove orphaned (dangling) entity references when an entity is deleted Active ).
Check that the keyword entity exists before attempting to call the label method on it.
N/A
N/A
N/A
Closed: duplicate
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Will be fixed in referenced issue.
π
Error: Call to a member function getName() on null in Drupal\bibcite_bibtex\Normalizer\BibtexReferenceNormalizer->extractContributors()
Fixed