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

Limit the php explode to 2 to prevent extra '=' sign content in the a… #25194

Merged

Conversation

dhoang89
Copy link

Limit the PHP explode to 2 to prevent extra '=' sign content in the attribute value being exploded to more than 2 elements in the result array.

Description (*)

Fixed Issues (if relevant)

  1. Magento 2.3: Import fails if configurable attribute has an equal sign in its value #25188: Import fails if configurable attribute has an equal sign in its value

Manual testing scenarios (*)

  1. Install a new Magento base on branch 2.3-develop
  2. Setup sample data following this Docs: https://devdocs.magento.com/guides/v2.3/install-gde/install/sample-data-after-clone.html
  3. Go to Magento's backend. Then go to STORES > Attributes > Product > Search for Attribute Size. Scroll down to tab Properties then on the right side select 'Manage Swatch (Values of Your Attribute)' Modify the value, add '=' to any value, let say SX=SX
  4. Reindex: bin/magento indexer:reindex
  5. Go to System > Export > Products
  6. Use the file you got from step 5 to import back. System > Import > Products
  7. The error message showup

Questions or comments

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 are green)

Duong Hoang added 2 commits October 21, 2019 14:19
…ttribute value being explode to more than 2 element in result array.
…ttribute value being explode to more than 2 element in result array.

--UPDATE-- add space after comma ','
@m2-assistant
Copy link

m2-assistant bot commented Oct 21, 2019

Hi @dhoang89. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@ghost ghost assigned swnsma Oct 21, 2019
@swnsma swnsma added Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Award: bug fix labels Oct 21, 2019
@engcom-Bravo engcom-Bravo self-assigned this Oct 21, 2019
@engcom-Bravo
Copy link
Contributor

Hello @dhoang89. Thank You for Your contribution. In order to further process Your PR, please cover it with the appropriate auto-tests.

@dhoang89
Copy link
Author

Hi @engcom-Bravo, can you show me how to create an auto-test for my PR? Thank you.

@swnsma
Copy link
Contributor

swnsma commented Oct 30, 2019

Hi, @dhoang89,
There is already tests available:
\Magento\ConfigurableImportExport\Model\Import\Product\Type\ConfigurableTest
Could you please add test-case to check the issue which you have fixed?

@sidolov sidolov changed the base branch from 2.3-develop to 2.4-develop December 5, 2019 17:17
@engcom-Golf engcom-Golf self-assigned this Jan 8, 2020
@engcom-Golf
Copy link
Contributor

I will take care of test coverage

@engcom-Golf engcom-Golf added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Jan 8, 2020
@engcom-Golf
Copy link
Contributor

HI @swnsma changes covered by unit test, could you please review ?

@engcom-Golf
Copy link
Contributor

@magento run all tests

@swnsma
Copy link
Contributor

swnsma commented Jan 9, 2020

@magento run Unit Tests

@swnsma swnsma self-requested a review January 10, 2020 16:05
@magento-engcom-team
Copy link
Contributor

Hi @swnsma, thank you for the review.
ENGCOM-6141 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@m2-assistant
Copy link

m2-assistant bot commented Jan 17, 2020

Hi @dhoang89, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@sdzhepa sdzhepa mentioned this pull request May 9, 2022
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.

None yet

8 participants