Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Entity Reference display formatter currently doesn't check if the entity has canonical path or not, by default, it display the entity with a link.
This will encounter a WSOD when the entity doesn't have a canonical path.
Here is one test example: https://www.drupal.org/node/2826470#comment-11801660
Comments
Comment #10
LendudeAs far as I can see, a check for this was added in #2704743: Remove special case on EntityFormatter for new entities which hopefully solved this problem.
Code now in
\Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceEntityFormatter::viewElements
:That $entity->hasLinkTemplate('canonical') check was missing before this and that might have caused this bug.
If this is still an issue for you, could you provide some steps to reproduce this issue?