Skip to content

[Backport] Fix infinite checkout loader on a script error #15091

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

rogyar
Copy link
Contributor

@rogyar rogyar commented May 9, 2018

Original PR: #14874

Description

Infinite checkout loader may appear when some module makes a require call but the dependency wasn't returned (Network error).

The patch changes how Magento treats isPending modules. If all dependencies are errored - treat it as loaded.

Manual testing scenarios

  1. Open Magento/Checkout/view/frontend/web/js/model/quote.js
  2. Insert the following code:
require([
    'jquery',
    'https://some-site/tracking/api/js'
], function ($) {}, function () {});

right after

define([
    'ko',
    'underscore'
], function (ko, _) {
    'use strict';

    // add code here
  1. Navigate to checkout.
  2. You can't purchase the product because the page is blocked by loader.

@magento-engcom-team magento-engcom-team added this to the May 2018 milestone May 9, 2018
@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept labels May 9, 2018
@magento-engcom-team magento-engcom-team merged commit 78a2e51 into magento:2.1-develop May 12, 2018
@magento-engcom-team
Copy link
Contributor

Hi @rogyar. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.1.15 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants