diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php index 623140f..f020d11 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php @@ -101,6 +101,7 @@ public function viewElements(FieldItemListInterface $items) { // Hide the element links. $elements[$delta][$target_type][$item->target_id]['links']['#access'] = FALSE; } + $item->_attributes += array('resource' => 'node/' . $item->target_id); } else { // This is an "auto_create" item.