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

Save configurable product options after validation error #16597

Conversation

swnsma
Copy link
Contributor

@swnsma swnsma commented Jul 6, 2018

Description

  1. Fix issue with configurable product save.
  2. Improve fix for issue Product images gets removed from "Images And Videos" after validation alert. #7372 - cover edge case.

Fixed Issues

  1. Can't save attributes on a configurable product #13177: Can't save attributes on a configurable product
  2. Product images gets removed from "Images And Videos" after validation alert. #7372: Product images gets removed from "Images And Videos" after validation alert.

Manual testing scenarios

Pre-conditions

  1. Created configurable product with the options

Steps to reproduce

  1. Go to Admin Panel.
  2. Go to Product Edit form of Configurable product.
  3. Remove value from 'Name' attribute and press 'Save'.
  4. See js validation error.
  5. Fill 'Name' attribute and press 'Save'.

Expected result

  1. Product was saved

Actual result

  1. Magento report will be shown.
  2. After page reload, you will see session message 'Warning: array_filter() expects parameter 1 to be array, string given invendor/magento/module-configurable-product/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php on line 145

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)

al.kravchuk added 2 commits July 6, 2018 15:07
…ter validation alert.

- Add check for product in case of not initialized product.
- fix error while saving configurable product after validation error.
@magento-engcom-team magento-engcom-team added Partner: ISM eCompany Pull Request is created by partner ISM eCompany partners-contribution Pull Request is created by Magento Partner labels Jul 6, 2018
@magento-engcom-team
Copy link
Contributor

Hi @swnsma. 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

@magento-engcom-team
Copy link
Contributor

Hi @swnsma. 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants