Skip to content

Fix missing escape Url method #30008

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

Conversation

mrtuvn
Copy link
Contributor

@mrtuvn mrtuvn commented Sep 11, 2020

Description (*)

Correct missing escape url in layout template module widget

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. Go to Admin
  2. Go Content > Elements > Widgets
  3. Edit one exists widget
  4. Page should load without break
  5. Add layout update should work

For test edit widget add/delete "Layout Updates" we need merge the PR #29991 first

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)

Resolved issues:

  1. resolves [Issue] Fix missing escape Url method #30036: Fix missing escape Url method

@m2-assistant
Copy link

m2-assistant bot commented Sep 11, 2020

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

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

@rogyar
Copy link
Contributor

rogyar commented Sep 12, 2020

@magento run all tests

@sidolov sidolov added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Sep 14, 2020
@sidolov
Copy link
Contributor

sidolov commented Sep 14, 2020

@magento create issue

Copy link
Contributor

@sidolov sidolov left a comment

Choose a reason for hiding this comment

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

@mrtuvn could you please cover changes with automated test?

@mrtuvn
Copy link
Contributor Author

mrtuvn commented Sep 14, 2020

@sidolov i'm not sure how to start a test with such case
@engcom-Alfa @engcom-Charlie can you give any suggest on test cover?

@mrtuvn
Copy link
Contributor Author

mrtuvn commented Sep 16, 2020

@magento give me test instance

@magento-deployment-service
Copy link

Hi @mrtuvn. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Charlie
Copy link
Contributor

@mrtuvn you can write an integration test on the block which uses a template changed by this PR and checks if the additional code is present.
Thank you.

@engcom-Charlie engcom-Charlie self-assigned this Sep 16, 2020
@mrtuvn
Copy link
Contributor Author

mrtuvn commented Sep 18, 2020

@engcom-Charlie Can you help with cover by mftf ? I'm not familiar with mftf test

@engcom-Charlie
Copy link
Contributor

@mrtuvn Here is all information https://devdocs.magento.com/mftf/docs/introduction.html. If you will have any questions, let me know.
Thank you.

@mrtuvn mrtuvn force-pushed the fix-missing-escape-url-method branch from 28d2d9e to acf5fa6 Compare September 22, 2020 16:28
@mrtuvn
Copy link
Contributor Author

mrtuvn commented Sep 28, 2020

@magento run all tests
I think no need cover this PR with automated tests. Instead we can manually test. This file used in admin area so it's will not affected or impact to another area

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Sep 29, 2020

@mrtuvn can you please add additional info on how to reproduce the issue manually and expected/actual results?
Thank you.

up


fix static tests
@mrtuvn mrtuvn force-pushed the fix-missing-escape-url-method branch from acf5fa6 to 777c7c7 Compare September 30, 2020 16:05
@mrtuvn
Copy link
Contributor Author

mrtuvn commented Sep 30, 2020

rebase branch with latest mainline code base + add fix static tests

@engcom-Charlie
Copy link
Contributor

@mrtuvn I'll take care of test coverage.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@magento-engcom-team
Copy link
Contributor

Hi @sivaschenko, thank you for the review.
ENGCOM-8312 has been created to process this Pull Request
✳️ @sivaschenko, 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

@sivaschenko sivaschenko added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Oct 6, 2020
@sivaschenko
Copy link
Member

QA: Please consider including #29991 during testing if needed to unblock required scenarios

@engcom-Bravo
Copy link
Contributor

engcom-Bravo commented Oct 6, 2020

✔️ QA Passed

Layout Update can be added successfully and displayed correctly. Tested for a new Widget and editing an already existing one

Manual testing scenario

  1. Go to Content - Widgets. Click Add Widget
  2. Select for example
    Type - CMS Page Link
    Design Theme - Magento Blank
    click Continue
  3. Add several Layout Updates
  4. Specify different Diaplay on, Products, Container, Template for each added Layout Update
  5. Assert that all the Layout Updates are displayed correctly

Actual result

add_layout

NOTE that the bug with Deleting is not fixed in this PR
widget_before

@engcom-Bravo
Copy link
Contributor

Further investigation discovered that if there are a lot of Layout Updates added, and after the web page is refreshed, it's taking some time for the options to load
widge_load

@sivaschenko @sidolov Please see if this is acceptable

@engcom-Bravo engcom-Bravo added the QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope label Oct 6, 2020
@magento-engcom-team magento-engcom-team merged commit f96b45e into magento:2.4-develop Oct 7, 2020
@m2-assistant
Copy link

m2-assistant bot commented Oct 7, 2020

Hi @mrtuvn, 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.

@mrtuvn mrtuvn deleted the fix-missing-escape-url-method branch October 13, 2020 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Widget Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Issue] Fix missing escape Url method
7 participants