diff -u b/core/modules/hal/src/Normalizer/EntityReferenceItemNormalizer.php b/core/modules/hal/src/Normalizer/EntityReferenceItemNormalizer.php --- b/core/modules/hal/src/Normalizer/EntityReferenceItemNormalizer.php +++ b/core/modules/hal/src/Normalizer/EntityReferenceItemNormalizer.php @@ -81,7 +81,7 @@ $context['included_fields'] = ['uuid']; // Normalize the target entity unless it recurses onto itself - if (!empty($field_item->getEntity()) && $field_item->getEntity()->getEntityType() == $target_entity->getEntityType() && + if (!empty($field_item->getEntity()->id()) && $field_item->getEntity()->getEntityType() == $target_entity->getEntityType() && $field_item->getEntity()->id() == $target_entity->id()) { return parent::normalize($field_item, $format, $context); }