-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed review list ajax if product not exist redirect to 404 page #13102 #15369
Fixed review list ajax if product not exist redirect to 404 page #13102 #15369
Conversation
Hi @Ananth747, can you sign pls our contributor License Agreement. best regards, Lars |
/** @var \Magento\Framework\Controller\Result\Forward $resultForward */ | ||
$resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD); | ||
$resultForward->forward('noroute'); | ||
return $resultForward; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is unnecessary else statement you can remove this.
/**
* Show list of product's reviews
*
* @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface
*/
public function execute()
{
if (!$this->initProduct()) {
/** @var \Magento\Framework\Controller\Result\Forward $resultForward */
$resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD);
return $resultForward->forward('noroute');
}
return $this->resultFactory->create(ResultFactory::TYPE_LAYOUT);
}
@larsroettig @magento-cicd2 I've signed CLA when it will be accepted? |
Hi @Ananth747 , looks like your commits were pushed with the different email than on GitHub profile, please, add email from commits to your account and issue with CLA will be fixed. |
@magento-cicd2 @sidolov @larsroettig |
Hi @Ananth747. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
Issue was review list ajax call giving php error log or error number if invalid product id. It should be 404 page.
Fixed Issues (if relevant)
Manual testing scenarios
<Magento store url>/review/product/listAjax/id/{{non existent id}/
Contribution checklist