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

32987 Don't load the captcha files on the storefront if it is disabled in the configurations #33200

Conversation

khrystynastolbova
Copy link
Contributor

@khrystynastolbova khrystynastolbova commented Jun 9, 2021

Description (*)

Don't load the captcha files on the storefront if it is disabled in the configurations

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Disable captcha storefont config still load captcha js files #32987

Manual testing scenarios (*)

  1. Enable captcha in the configs
    Stores->Configuration->CUSTOMERS->Customer Configuration->CAPTCHA->Enable CAPTCHA on Storefront->Yes

Home page
Screenshot 2021-06-09 at 16 37 47

Checkout page
Screenshot 2021-06-09 at 16 53 57

  1. Disable captcha in the configs
    Stores->Configuration->CUSTOMERS->Customer Configuration->CAPTCHA->Enable CAPTCHA on Storefront->No

Home page
Screenshot 2021-06-09 at 13 51 52

Checkout page
Screenshot 2021-06-09 at 16 56 59

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)
  • 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)

@m2-assistant
Copy link

m2-assistant bot commented Jun 9, 2021

Hi @khrystynastolbova. 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: P2 A defect with this priority could have functionality issues which are not to expectations. label Jun 9, 2021
@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 9, 2021

Can you resolve conflicts file xml

Copy link
Contributor

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

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

Hello @khrystynastolbova
Thank you for your contribution.
Could you please resolve the merge conflict?
Thank you in advance.

@khrystynastolbova
Copy link
Contributor Author

khrystynastolbova commented Jun 9, 2021

Hi, @mrtuvn and @andrewbess. Thanks! I have resolved the conflict.

I couldn't disable all captcha js files at the checkout page.
Magento_PaypalCaptcha module uses 'Magento_Captcha/js/model/captchaList' js in its mixin for 'Magento_Checkout/js/view/payment/list'.
Please let me know if you have any ideas or suggestions. Thanks!

@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 10, 2021

Seem you need to do same solution for paypal captcha. This module maybe depend on captcha default with some extend behavior work for paypal flow

@andrewbess
Copy link
Contributor

@magento run all tests

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

@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 11, 2021

@magento run all tests

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

@khrystynastolbova
Copy link
Contributor Author

@magento run all tests

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

@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 28, 2021

@magento run Functional Tests EE, Functional Tests B2B

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

@mrtuvn
Copy link
Contributor

mrtuvn commented Jul 13, 2021

@magento run Functional Tests EE, Functional Tests B2B

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

@mrtuvn
Copy link
Contributor

mrtuvn commented Jul 13, 2021

Hi @khrystynastolbova Thanks for work on this ! Do you finish this development

@speedupmate
Copy link
Contributor

great input

but to solve this completely refer to #15967 and note that some of those extensions define mixins that are not disabled until extensions are not disabled withbin/magento module:disable

vendor/magento/module-re-captcha-paypal/view/frontend/requirejs-config.js 
vendor/magento/module-re-captcha-webapi-ui/view/frontend/requirejs-config.js
vendor/magento/module-re-captcha-frontend-ui/view/frontend/requirejs-config.js
vendor/magento/module-re-captcha-checkout/view/frontend/requirejs-config.js

insted of defining mixins alternative is to get the mixed dependencies on uiComponent init from requirejs dependency injection or from uiregistry (async) and wrap whats needed , add the needed additional validators instead of place order mixins etc

@engcom-Alfa
Copy link
Contributor

Hi @khrystynastolbova , @mrtuvn , @andrewbess and @speedupmate Thanks for your contribution and collaboration!

I have tried to reproduce the issue in 2.4-develop version and the issue is still existing.
With the help of this PR changes, I have re-tested the issue has been fixed with the current changes as well.
But, based on the above comment, I can see that, we are still incomplete with the code updates.

Hi @khrystynastolbova

  1. Can you please confirm me that, current file changes are enough to take the ticket forward, or are you coming with the code changes as described in above comments.
  2. We have this ticket On Hold, and checked in related other tickets including internal ticket, we have no reason for keeping it on hold. Looks like it is due to SVC failure. Can you please if there is any other reason?
  3. I will wait for your reply, and in any case later, I will check with internal developers whether to consider or no, based on your reply.

Thanks in advance!

@ishakhsuvarov
Copy link
Contributor

Closing this PR for now due to long inactivity.

Please feel free to reopen when ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Component: Captcha Component: Checkout Component: Customer Component: PaypalCaptcha Component: SalesRule improvement 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. Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable captcha storefont config still load captcha js files
7 participants