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

Blank page at the checkout 'shipping' step #11197

Closed
alexpoletaev opened this issue Oct 3, 2017 · 10 comments
Closed

Blank page at the checkout 'shipping' step #11197

alexpoletaev opened this issue Oct 3, 2017 · 10 comments
Labels
Area: Frontend Component: Checkout Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 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 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release

Comments

@alexpoletaev
Copy link

alexpoletaev commented Oct 3, 2017

Preconditions

  1. Vanilla Magento instance (2.1.x or 2.2.0)
  2. Deployed sample data

Steps to reproduce

  1. Add any product to the cart as a guest user
  2. Proceed to the checkout
  3. Fill address and customer data
  4. Proceed to the payment step
  5. Click 'Shipping' in the progress bar to return to the shipping step
  6. Click next and proceed again to the payment step
  7. Click 'back' button in the browser

Expected result

  1. The customer is redirected to shipping step and is able to change address data.

Actual result

  1. The shipping step (page) is blank.
    selection_160

Also if you click 'back' button in the browser instead of step 5, nothing will happen. I think that it's not acceptable too.

The problem is how Magento handles the URL hash in the handleHash method here:
vendor/magento/module-checkout/view/frontend/web/js/model/step-navigator.js

A possible workaround is to create a mixin for this JS file and override the handleHash method:

define([
    'mage/utils/wrapper'
], function (wrapper) {
    'use strict';

    return function (stepNavigator) {
        stepNavigator.handleHash = wrapper.wrap(stepNavigator.handleHash, function (originalAction, event) {
            var hashString = window.location.hash.replace('#', '');
            if (hashString == ''
                && typeof event != 'undefined'
                && typeof event.originalEvent.oldURL != 'undefined'
                && event.originalEvent.oldURL.substring(event.originalEvent.oldURL.indexOf('#') + 1) == 'payment'
            ) {
                stepNavigator.navigateTo('shipping');
            }
            originalAction(event);
        });

        return stepNavigator;
    };
});
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Oct 3, 2017
@magento-engcom-team
Copy link
Contributor

@alexpoletaev, thank you for your report.
The issue is already fixed in develop branch
But we will consider to backport the fix to patch releases

@magento-engcom-team magento-engcom-team added 2.1.x Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Oct 3, 2017
@alexpoletaev
Copy link
Author

@magento-engcom-team thank you for your feedback!

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Oct 4, 2017

@magento-engcom-team where it was fixed? How can we find fix for this issue? I think it's really important to fix it ASAP because it's checkout, most important thing in ecommerce. If we will have info how it was fixed - someone could do backport for it.

@alexpoletaev
Copy link
Author

I agree, @magento-engcom-team could you please provide a link to commit with the fix? I didn't find any changes in the vendor/magento/module-checkout/view/frontend/web/js/model/step-navigator.js file and I want to know how it was fixed. Thanks.

@okorshenko
Copy link
Contributor

The issue has been fixed in 2.2-develop branch. Will be available with 2.2.2 release

@kapil019
Copy link

This is because of hash change in file step-navigator.js, when code is blank. This is refreshing page instead of hash change.

web/js/model/step-navigator.js

OLD CODE

window.location = window.checkoutConfig.checkoutUrl + "#" + code;

This should be

window.location.hash = code;

@ihor-sviziev
Copy link
Contributor

@kapil019 are you able to reproduce this issue in 2.2? If yes - please create issue on that with steps to reproduce.

@kapil019
Copy link

@ihor-sviziev I am using 2.1 and this is getting reproduce when new customer comes to order, After adding shipping address he/she redirected to billing address page and address got blank.

This comes only first time for new user, If he fill address again and submit. this will not reproduced. To reproduce again do not place order/logout and do same steps again.

In 2.2 there would be same steps

@ihor-sviziev ihor-sviziev added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jan 23, 2018
@ihor-sviziev
Copy link
Contributor

@kapil019 This issue marked as fixed in 2.2 with following PR: #11958
If you're interested - you could create backport PR of these changes to 2.1-develop branch and they will be available in one of next 2.1 patch releases.

@kapil019
Copy link

OK @ihor-sviziev I will do this in 2.1-develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Component: Checkout Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 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 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release
Projects
None yet
Development

No branches or pull requests

6 participants