Skip to content

Checkout/view/frontend/web/template/billing-address/details.html tries to join street address fields on undefined value #33826

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

Closed
4 tasks
speedupmate opened this issue Aug 17, 2021 · 21 comments
Assignees
Labels
Area: Cart & Checkout Component: Checkout Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.3 Indicates original Magento version for the Issue report. Severity: S1 Affects critical data or functionality and forces users to employ a workaround.

Comments

@speedupmate
Copy link
Contributor

Preconditions (*)

  1. 2.4.3

Steps to reproduce (*)

  1. reach checkout payment step with billing address missing street fields or street field is not a array

Expected result (*)

  1. no errors displayed , checkout working

Actual result (*)

  1. error logged, all script execution broken

Uncaught TypeError: Unable to process binding "text: function(){return currentBillingAddress().street.join(', ') }"

  1. this is caused in https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html

created with a commit by @rostyslav-hymon on following 53b85cc#diff-e4dcdf0e20375ec650339c4cc63147ff8156a5eb9d2e82e2927d744599d157b5

  1. was working before on 2.4.2 (p1 and p2 included) so probably a mixup of template edited as the change is completely lost on git history for this specific line : https://github.com/magento/magento2/blob/2.4.2/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • [ * ] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Aug 17, 2021

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

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues 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 issues 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

@mrtuvn
Copy link
Contributor

mrtuvn commented Aug 18, 2021

Is there any solutions for such case ? Highly interesting this issue

@mrtuvn
Copy link
Contributor

mrtuvn commented Aug 18, 2021

Seem in magento requirejs default use async mode for request scripts

@ihor-sviziev ihor-sviziev added Reported on 2.4.3 Indicates original Magento version for the Issue report. Severity: S0 A problem that is blocking the ability to work. An immediate fix is needed. Severity: S1 Affects critical data or functionality and forces users to employ a workaround. and removed Severity: S0 A problem that is blocking the ability to work. An immediate fix is needed. labels Aug 18, 2021
@ihor-sviziev
Copy link
Contributor

@sivaschenko @sidolov @gabrieldagama, this issue should have p1 prio

@speedupmate
Copy link
Contributor Author

Is there any solutions for such case ? Highly interesting this issue

yes, rewrite/revert in theme scope

@sidolov sidolov added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Aug 19, 2021
@sidolov sidolov added Area: Cart & Checkout Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Aug 19, 2021
@github-jira-sync-bot
Copy link

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

@sidolov sidolov added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Aug 19, 2021
@github-jira-sync-bot
Copy link

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

@sidolov sidolov added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Aug 19, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-691 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Aug 19, 2021

✅ Confirmed by @sidolov. Thank you for verifying the issue.
Issue Available: @sidolov, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-Charlie engcom-Charlie added Component: Checkout Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Aug 25, 2021
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-691

@speedupmate
Copy link
Contributor Author

@engcom-Bravo fake the object from developer tools for your test if you can't find other ways

@engcom-Hotel engcom-Hotel self-assigned this Dec 16, 2021
@m2-assistant
Copy link

m2-assistant bot commented Dec 16, 2021

Hi @engcom-Hotel. 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.
    1. 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!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

@engcom-Hotel
Copy link
Contributor

Hi @speedupmate,

Thank you for reporting the issue.

However, we tried to reproduce it on Magento 2.4-develop, we didn’t find any error in the checkout and the adding/updating billing address.

Steps followed to reproduce issue:

  1. Added product to the cart, started the checkout process.
  2. Added new billing address, also tried the existing address.
  3. Able to checkout successfully.
  4. Tried to update billing address using the admin panel but the empty address is not allowed(See below-attached screenshot).

Screenshot 2021-12-13 at 9 18 26 PM

Screenshot 2021-12-13 at 9 27 22 PM

Screenshot 2021-12-13 at 9 27 52 PM

As we are not able to reproduce this issue, hence closing this issue.

Thanks

@speedupmate
Copy link
Contributor Author

@engcom-Hotel

this is so simple programming ABC I can't even argue here:

  1. if you request a property or method from the object and the object does not exist it will fail so currentBillingAddress().street will fail if currentBillingAddress() is "null, undefined, false , or does not have the street property".
  2. it was working before and you were spoon fed with the exact line and before and after and pointed to a commit that changes this to be broken

If you can't replicate this then make a condition where you can. Take dev-tools , add a breakpoint , remove the street variable from the object before you hit that line and you are there. This can happen when checkout templates are customised , network has issues as the checkout is not async, it tries to be but the asset loading is still a waterfall and quote object or any object related to it can be undefined, null, object, object with random parameters, object with full parameters, object without methods or full and proper object dependant on page loading and object init sequence .

simplest customisation trough layout file is that you reveal the payment methods on first step , just move the xml to first step and you have it

@ihor-sviziev maybe you can enlighten the team here

@ihor-sviziev
Copy link
Contributor

Maybe @sdzhepa ?

@sdzhepa
Copy link
Contributor

sdzhepa commented Dec 17, 2021

@engcom-Hotel

Could you please review this issue one more time?
also, i noticed that this issue was fixed in the scope https://jira.corp.magento.com/browse/AC-691. PR is created but not merged yet. I assume it means that Issue is reproducible

So, could you pls investigate the situation and bring more clarity to it?

cc: @ihor-sviziev , @speedupmate

@sdzhepa sdzhepa reopened this Dec 17, 2021
@m2-community-project m2-community-project bot added Progress: dev in progress and removed 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 Progress: done Issue: ready for confirmation labels Dec 17, 2021
@engcom-Hotel
Copy link
Contributor

Hello @sdzhepa @speedupmate @ihor-sviziev

We will look into it and get back to you soon.

Thanks

@hostep
Copy link
Contributor

hostep commented Feb 1, 2022

Since this issue got closed without info, I searched the commits a bit for a reference that mentions "AC-691" and found this one: e2e82b0, hope it helps for people searching for a solution.

@leonhelmus
Copy link

@hostep was this resolved in 2.4.5?

@speedupmate
Copy link
Contributor Author

@leonhelmus yes this is resolved in 2.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Cart & Checkout Component: Checkout Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.3 Indicates original Magento version for the Issue report. Severity: S1 Affects critical data or functionality and forces users to employ a workaround.
Projects
Archived in project
Development

No branches or pull requests