diff --git a/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php b/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php index 7060687..0fc9272 100644 --- a/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php +++ b/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php @@ -79,7 +79,7 @@ public function update() { } // Only save a non-empty alias. elseif ($this->alias) { - $entity = $this->getParent()->getParent(); + $entity = $this->getEntity(); // Ensure fields for programmatic executions. $uri = $entity->uri(); @@ -94,7 +94,7 @@ public function update() { */ public function delete() { // Delete all aliases associated with this entity. - $uri = $this->getParent()->getParent()->uri(); + $uri = $this->getEntity()->uri(); \Drupal::service('path.crud')->delete(array('source' => $uri['path'])); }