diff --git a/src/Form/ParagraphDeleteForm.php b/src/Form/ParagraphDeleteForm.php index 306560e31d7b661feccf0860316cebb928702100..a94eb610c77b826dda9afd984e0bb16c4b137358 100644 --- a/src/Form/ParagraphDeleteForm.php +++ b/src/Form/ParagraphDeleteForm.php @@ -46,10 +46,7 @@ class ParagraphDeleteForm extends ParagraphDeleteFormBase { * {@inheritdoc} */ public function getCancelUrl() { - /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ - $paragraph = $this->getEntity(); - $entity = $this->lineageInspector()->getRootParent($paragraph); - return $entity->hasLinkTemplate('canonical') ? $entity->toUrl() : Url::fromRoute('<front>'); + return Url::fromRoute('frontend_editing.form', ['type' => 'paragraph', 'id' => $this->getEntity()->id()]); } }