Skip to content

Issue 8131 - Use Redirect Factory to Allow Error Message Display on Advanced Search #16952

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

Merged
merged 3 commits into from
Jul 27, 2018

Conversation

brobie
Copy link
Contributor

@brobie brobie commented Jul 20, 2018

Change controller to use result redirect factory which fixes error message display on advanced search form.

#8131

Description

The way the redirect was initiated from the result controller needed to be changed to use a result redirect so that the error message would be written to the cookie. Without this, the Index controller wouldn't be called when Page Cache was enabled, and the error message would never reach the page.

Fixed Issues (if relevant)

  1. Magento 2.1.3 - There is a bug in advanced search form regarding validation messages #8131: Magento 2.1.3 - There is a bug in advanced search form regarding validation messages

Manual testing scenarios

  1. Navigate to Advanced Search
  2. Without filling out any form input field, click "Search"
  3. You should see the error message requiring you to fill in at least one form.

This should work when page cache is enabled and disabled.

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)

…ixes error message display on advanced search form.

magento#8131
@magento-engcom-team magento-engcom-team added partners-contribution Pull Request is created by Magento Partner Partner: DEG labels Jul 20, 2018
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jul 20, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @brobie. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@ihor-sviziev ihor-sviziev self-assigned this Jul 20, 2018
'urlFactory' => $urlFactoryMock
]
);
$instance->execute();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be good idea to check if method returned $responseMock

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ihor-sviziev - Done, pushed, and pending automated testing.

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-2455 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@brobie thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team
Copy link
Contributor

Hi @brobie. Thank you for your contribution.
We will aim to release these changes as part of 2.2.6.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants