We've recently upgraded a magento 2 site to 2.1.2 and since doing so the /checkout/ page has a strange issue. Once the page has completely loaded the loader gif does not disappear - it just stays spinning on the page.

How would I go about fixing this issue?

  • check console error. Nov 10, 2016 at 12:31
  • There are no console or log errors.
    – Aravona
    Nov 10, 2016 at 12:48

1 Answer 1


This could be because you have an overwrite of onepage.phtml in one of your themes or modules.

I noticed in one of our upgrades, which was experiencing the same issue, that #checkout-loader div was missing the data-mage-init attribute.

This what the div attributes should look like:

<div id="checkout-loader" data-role="checkout-loader" class="loading-mask" data-mage-init='{"checkoutLoader": {}}'>

If you have overwritten onepage.phtml try this fix and use vendor/magento/module-checkout/view/frontend/templates/onepage.phtml as a reference for any other discrepancies.

  • We do have a div <div id="checkout-loader" data-role="checkout-loader" class="loading-mask"> but it doesn't appear to have the data-mage-init='{"checkoutLoader": {}}'
    – Aravona
    Jan 26, 2017 at 14:34
  • Correcting this worked perfectly.
    – Aravona
    Jan 26, 2017 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.