Skip to content

Commit 85b698b

Browse files
ENGCOM-4719: Fixed wrong url redirect when edit product review from product view page #22202
- Merge Pull Request #22202 from ravi-chandra3197/magento2:patch-product-review-redirect - Merged commits: 1. 594badb 2. cc5c711
2 parents d81b399 + cc5c711 commit 85b698b

File tree

2 files changed

+6
-1
lines changed
  • app/code/Magento/Review

2 files changed

+6
-1
lines changed

app/code/Magento/Review/Block/Adminhtml/Edit/Form.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ protected function _prepareForm()
8484
'review/*/save',
8585
[
8686
'id' => $this->getRequest()->getParam('id'),
87-
'ret' => $this->_coreRegistry->registry('ret')
87+
'ret' => $this->_coreRegistry->registry('ret'),
88+
'productId' => $this->getRequest()->getParam('productId')
8889
]
8990
),
9091
'method' => 'post',

app/code/Magento/Review/Controller/Adminhtml/Product/Save.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ public function execute()
7373
} else {
7474
$resultRedirect->setPath('*/*/');
7575
}
76+
$productId = (int)$this->getRequest()->getParam('productId');
77+
if ($productId) {
78+
$resultRedirect->setPath("catalog/product/edit/id/$productId");
79+
}
7680
return $resultRedirect;
7781
}
7882
$resultRedirect->setPath('review/*/');

0 commit comments

Comments
 (0)