From 8e6277fb1e9c2d31a0321431733d53de6ab931c5 Mon Sep 17 00:00:00 2001 From: Shaheer Date: Mon, 31 Aug 2015 10:06:09 +0500 Subject: [PATCH] Error In CategoryEdit --- .../Magento/Catalog/Controller/Adminhtml/Category/Tree.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Tree.php index 9acd075bc8276..99209768639bf 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Category/Tree.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Category/Tree.php @@ -43,7 +43,7 @@ public function execute() { $storeId = (int)$this->getRequest()->getParam('store'); $categoryId = (int)$this->getRequest()->getParam('id'); - + $resultRedirect = $this->resultRedirectFactory->create(); if ($storeId) { if (!$categoryId) { $store = $this->_objectManager @@ -57,7 +57,7 @@ public function execute() $category = $this->_initCategory(true); if (!$category) { /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ - $resultRedirect = $this->resultRedirectFactory->create(); + return $resultRedirect->setPath('catalog/*/', ['_current' => true, 'id' => null]); } @@ -65,7 +65,7 @@ public function execute() $root = $block->getRoot(); /** @var \Magento\Framework\Controller\Result\Json $resultJson */ $resultJson = $this->resultJsonFactory->create(); - return $resultJson->setData([ + $resultJson->setData([ 'data' => $block->getTree(), 'parameters' => [ 'text' => $block->buildNodeName($root), @@ -78,5 +78,6 @@ public function execute() 'root_visible' => (int)$root->getIsVisible(), ], ]); + return $resultRedirect->setPath('catalog/category/edit', ['_current' => true, 'id' => $categoryId]); } }