Skip to content
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

Merged

Conversation

ananth-iyer
Copy link
Member

@ananth-iyer ananth-iyer commented May 19, 2018

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)

  1. review/product/listAjax/id/{{non existent id}/ #13102, Page was not redirect to 404 page.

Manual testing scenarios

  1. Use invalid product id in review list ajax
  2. For example: <Magento store url>/review/product/listAjax/id/{{non existent id}/

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented May 19, 2018

CLA assistant check
All committers have signed the CLA.

@ananth-iyer ananth-iyer added Event: dmcdindia Progress: PR Created Indicates that Pull Request has been created to fix issue labels May 19, 2018
@larsroettig
Copy link
Member

Hi @Ananth747, can you sign pls our contributor License Agreement.
I start now with review and testing.

best regards,

Lars

@larsroettig larsroettig self-requested a review July 11, 2018 17:22
/** @var \Magento\Framework\Controller\Result\Forward $resultForward */
$resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD);
$resultForward->forward('noroute');
return $resultForward;
} else {
Copy link
Member

@larsroettig larsroettig Jul 11, 2018

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 larsroettig self-assigned this Jul 11, 2018
@larsroettig larsroettig added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update bugfix Release Line: 2.2 labels Jul 11, 2018
@ananth-iyer
Copy link
Member Author

@larsroettig @magento-cicd2 I've signed CLA when it will be accepted?

@sidolov
Copy link
Contributor

sidolov commented Aug 10, 2018

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.

@ananth-iyer
Copy link
Member Author

@magento-cicd2 @sidolov @larsroettig
I've added the email that was used for commit. Now CLA check is passed.
Sorry for the misunderstanding.

@magento-engcom-team
Copy link
Contributor

Hi @Ananth747. Thank you for your contribution.
We will aim to release these changes as part of 2.2.7.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Award: bug fix bugfix Component: Review Event: dmcdindia Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants