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

Switching billing address causes Javascript function text to render in front-end checkout payment section #26375

Closed
chris-pook opened this issue Jan 13, 2020 · 18 comments
Assignees
Labels
Component: Braintree Component: Checkout Component: Payment Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reported on 2.3.3 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@chris-pook
Copy link
Contributor

chris-pook commented Jan 13, 2020

With the Braintree payment method enabled, when switching billing address using the dropdown of the customer's saved addresses a ton of javascript gets rendered to the page (looks like PrototypeJS source code). This is really nasty and looks quite scary right in the payment step alongside the customer's payment card details..

Preconditions (*)

  1. Magento 2.3.3 installed
  2. Braintree payment method enabled

Steps to reproduce (*)

  1. Enable and configure Braintree module
  2. Register a customer account
  3. Add at least one address to the customer account
  4. Add a product to cart
  5. Go to checkout
  6. Proceed to payment step
  7. Untick "My billing and shipping address are the same"
  8. Select an address from dropdown
  9. Click "update"

Expected result (*)

  1. The address section should update to reflect the selected address

Actual result (*)

  1. The address section updates but includes a lot of javascript code text
    image
@m2-assistant
Copy link

m2-assistant bot commented Jan 13, 2020

Hi @chris-pook. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

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

@chris-pook do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 13, 2020
@chris-pook
Copy link
Contributor Author

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @chris-pook. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@chris-pook
Copy link
Contributor Author

The above instance request did not work, tryinga 2.4 one...

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @chris-pook. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @chris-pook, here is your Magento instance.
Admin access: https://i-26375-2-4-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@chris-pook
Copy link
Contributor Author

Can confirm this is still an issue on 2.4-develop, tested on instance above.

image

@ghost ghost assigned chris-pook and unassigned chris-pook Jan 14, 2020
@sudheers-kensium sudheers-kensium added Component: Shipping Component: Checkout Component: Payment Component: Braintree Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch and removed Component: Shipping labels Jan 14, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @sudheers-kensium
Thank you for verifying the issue. Based on the provided information internal tickets MC-30410 were created

Issue Available: @sudheers-kensium, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 14, 2020
@sudheers-kensium sudheers-kensium added the Progress: PR Created Indicates that Pull Request has been created to fix issue label Jan 14, 2020
@chris-pook chris-pook assigned chris-pook and unassigned chris-pook Jan 14, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jan 14, 2020

Hi @chris-pook. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@slavvka
Copy link
Member

slavvka commented Feb 9, 2020

Hi @chris-pook. Thank you for your report.
The issue has been fixed in #26378 by @chris-pook in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

@slavvka slavvka added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Feb 9, 2020
@slavvka slavvka closed this as completed Feb 9, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.3.3 Indicates original Magento version for the Issue report. label Nov 13, 2020
@advocat
Copy link

advocat commented Nov 14, 2020

I found one more case that caused the same issue

Preconditions (*)

  • Magento 2.4.1 installed
  • Google Tag Manager is enabled
  • Cash Money Order payment is enabled

Steps to reproduce (*)

  • Enable and configure Google Tag Manager
  • Add a product to cart
  • Go to checkout
  • Proceed to payment step

Expected result (*)
The address has correct street

Actual result (*)
The address section includes a lot of javascript code text

Root Cause
Load legacy Prototype in Magento_GoogleTagManager/web/js/google-analytics-universal.js

@alwinj1989
Copy link

yes, I am able to reproduce the above issue .. Can I know whether above issue been resolved?

@jglassmaker
Copy link

This is still an issue in Magento 2.4.2.
For a quick fix remove 'prototype' from the define includes inside google-analytics-universal.js

@davemyb
Copy link

davemyb commented Feb 15, 2021

Same issue is occurring with Stripe as the payment provider. The fix proposed above by jglassmaker works to solve it.

@jlenzstaysafe
Copy link

Why is this closed? Still happening on 2.4.2 EE.

@chirag-taraviya
Copy link

chirag-taraviya commented Apr 2, 2021

Issue is still in Magento 2.4.2 EE.

Temporary For a quick fix remove 'prototype' from the define includes inside google-analytics-universal.js
May be cause issue with catalog ajax pagination.

@rahulbarotk
Copy link

This issue is still exists in Magento 2.4.2 EE.

@aboritskiy
Copy link

seems like there is an official patch for this problem: https://support.magento.com/hc/en-us/articles/360058863531-MDVA-33289-Magento-patch-Javascript-in-address-at-checkout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Braintree Component: Checkout Component: Payment Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reported on 2.3.3 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests