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

32824-generated-associated-product-name #32889

Conversation

SilinMykola
Copy link
Contributor

@SilinMykola SilinMykola commented Apr 28, 2021

Description (*)

I changed component for configurable product configuration variations app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/components/dynamic-rows-configurable.js
I fixed error with special characters on Name field during configurable product creation.

Fixed Issues (if relevant)

  1. Fixes Generated Associated Product Name and SKU have issue #32824

Manual testing scenarios (*)

  1. Create Configurable Product
  2. Add name Like "Test A&B"
  3. Create Configuration and Add color Attributue than select any color
  4. Generate Products

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] 32824-generated-associated-product-name #35858: 32824-generated-associated-product-name

@m2-assistant
Copy link

m2-assistant bot commented Apr 28, 2021

Hi @SilinMykola. Thank you for your contribution
Here are 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.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project bot added the Priority: P3 May be fixed according to the position in the backlog. label Apr 28, 2021
@magento-engcom-team magento-engcom-team added Area: Frontend Component: ConfigurableProduct Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Apr 28, 2021
@m2-community-project m2-community-project bot added this to Pending Review in Pull Requests Dashboard Apr 28, 2021
@SilinMykola
Copy link
Contributor Author

@magento run all tests

@atwixfirster
Copy link
Contributor

@magento run Sample Data Tests CE

@SilinMykola
Copy link
Contributor Author

@magento run Functional Tests EE

@Den4ik Den4ik self-assigned this Apr 28, 2021
@m2-community-project m2-community-project bot moved this from Pending Review to Review in Progress in Pull Requests Dashboard Apr 28, 2021
@Den4ik
Copy link
Contributor

Den4ik commented Apr 28, 2021

@magento-engcom-team Could some one give description from MAGETWO-88649: Wrong swatches behavior task?
This PR looks correct but is reverting changes from 1ccf127 and can assume that issue MAGETWO-88649 could back

cc: @gabrieldagama @sidolov

@Den4ik
Copy link
Contributor

Den4ik commented Apr 28, 2021

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

Copy link
Contributor

@Den4ik Den4ik left a comment

Choose a reason for hiding this comment

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

@SilinMykola Thanks for your contribution. I'm approving this PR because it looks correct for me.
I hope Core team pay attention to my comment #32889 (comment)

@m2-community-project m2-community-project bot moved this from Review in Progress to Ready for Testing in Pull Requests Dashboard May 2, 2021
@magento-engcom-team
Copy link
Contributor

Hi @Den4ik, thank you for the review.
ENGCOM-9059 has been created to process this Pull Request
✳️ @Den4ik, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@Den4ik Den4ik added the Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests label May 2, 2021
@gabrieldagama
Copy link
Contributor

Hi @Den4ik, the MAGETWO-88649 fixes were done to prevent XSS. Maybe we should look into some way on fixing this problem?

Thanks.

@Den4ik
Copy link
Contributor

Den4ik commented May 4, 2021

@gabrieldagama Thanks for info.
I'm totally agree that we should look at this and don't rollback possible xss issue.

@SilinMykola Could you please analyse this situation?

@SilinMykola
Copy link
Contributor Author

@Den4ik Hello! Thanks for your time! My PR makes the same as #25591 PR. The 'name' and the 'sku' fields look the same on admin panel. I think this representation (with tag) for a name field is unnecessary and does not give the desired effect.

@Den4ik
Copy link
Contributor

Den4ik commented Jun 22, 2021

@SilinMykola Sorry for delay with answer. I agree with @gabrieldagama that we should look at some way for prevent XSS

@SilinMykola
Copy link
Contributor Author

@Den4ik, @gabrieldagama Hello! I try to use Magento_Security/js/escaper component, but I had the same result

escaper.escapeHtml(row.name)
"Test A&amp;B-Black"

I think we can't add escaper and left special chars in field value. Or we should to add special characters to exclusion.
What do you think?

@Den4ik
Copy link
Contributor

Den4ik commented Jul 29, 2021

@SilinMykola Currently I don't see any good solutions except of adding replace for &amp; string after escapeHtml

@SilinMykola
Copy link
Contributor Author

@SilinMykola Currently I don't see any good solutions except of adding replace for &amp; string after escapeHtml
@Den4ik, hi!
But what about another special chars?
Should I create new commit with escaper?

@Den4ik
Copy link
Contributor

Den4ik commented Jul 29, 2021

@SilinMykola Currently I don't see any good solutions except of adding replace for &amp; string after escapeHtml
@Den4ik, hi!
But what about another special chars?
Should I create new commit with escaper?

@SilinMykola I think we can update Magento_Security/js/escaper. If fact innerHtml replace only &, < and >.

@engcom-Alfa
Copy link
Contributor

@magento create issue

@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Aug 2, 2022
@m2-community-project m2-community-project bot removed this from Ready for Testing in Pull Requests Dashboard Aug 2, 2022
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Manual testing scenario:

  1. Login to admin, and navigate to catalog> Product.
  2. Create a Configurable Product with the name Test A&B-Alpha. Make sure to have one attribute selected atleast while creating product.
  3. View the Variations section of the Configurable Product creation page.

Before: ✖️ Product variation names were getting updated with amp text along with &.
image

After: ✔️ Product variation names are getting updated with product name only, without any additional amp text.
image

Additional Scenarios/ Info:

  1. After the PR changes, cross checked the existing config product where the variation name is updated with amp text. That has changed to proper product name variant back.

Since it is a minor name correction, does not require any additional regression cases to be created.

@engcom-Alfa engcom-Alfa self-assigned this Aug 2, 2022
@engcom-Alfa engcom-Alfa removed the Priority: P3 May be fixed according to the position in the backlog. label Aug 2, 2022
@engcom-Alfa engcom-Alfa moved this from Ready for Testing to Testing in Progress in High Priority Pull Requests Dashboard Aug 2, 2022
@engcom-Alfa engcom-Alfa moved this from Testing in Progress to Merge in Progress in High Priority Pull Requests Dashboard Aug 2, 2022
@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 65fef45 into magento:2.4-develop Aug 8, 2022
@ishakhsuvarov ishakhsuvarov moved this from Merge in Progress to Recently Merged in High Priority Pull Requests Dashboard Aug 9, 2022
@SilinMykola SilinMykola deleted the 32824-generated-associated-product-name-issue branch August 23, 2022 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Component: ConfigurableProduct Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] 32824-generated-associated-product-name Generated Associated Product Name and SKU have issue
7 participants