Correctly get the author, at least when only one

This commit is contained in:
benjamin melançon 2019-09-29 12:20:57 -04:00
parent 4ddfa5fc7c
commit c584a088fb

View file

@ -75,7 +75,7 @@ function geo_citation_pseudo_field($entity) {
return $markup; return $markup;
} }
$authors = $entity->field_authors->getValue(); $authors = $entity->field_authors->entity->title->value;
$date = $entity->field_publication_date->value; $date = $entity->field_publication_date->value;
$year = substr($date, 0, 4); $year = substr($date, 0, 4);
$title = $entity->title->value; $title = $entity->title->value;