diff --git a/core/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php b/core/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php
index 882fdc9..ef29486 100644
--- a/core/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php
+++ b/core/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php
@@ -60,7 +60,10 @@ public function getQuestion() {
    * {@inheritdoc}
    */
   public function getCancelUrl() {
-    return new Url('entity.menu.edit_form', array('menu' => $this->entity->getMenuName()));
+    if ($this->moduleHandler->moduleExists('menu_ui')) {
+      return new Url('entity.menu.edit_form', array('menu' => $this->entity->getMenuName()));
+    }
+    return $this->entity->urlInfo();
   }
 
   /**
