Infinite loading button on Shopify theme

Today I’ve a problem with a Shopify theme when I try to put on cart an Item. The button is infinite loading.
I’ve an JS error in console and I suspect this come from here:

TypeError: Cannot read property 'classList' of null
    at Product._setCartCountBubble (theme.js?v=14877781539576074710:8609)
    at theme.js?v=14877781539576074710:8434

The line 8609 of the file is:


That’s right, cartCountBubble is empty in Object:

cartCountBubble: null

I don’t know where it could have come from other than here and I can’t put all the code back together to understand….

40 thoughts on “Infinite loading button on Shopify theme”

  1. I had this issue. It was indeed a mistake I have done in the header…

    <div style="display: none;" id="CartCount" class="site-header__cart-count{% if cart.item_count == 0 %} hide{% endif %} critical-hidden" data-cart-count-bubble>
         <span data-cart-count>{{ cart.item_count }}</span>
         <span class="icon__fallback-text medium-up--hide">
               {{ 'layout.cart.items_count' | t: count: cart.item_count }}

    I used to remove the count bubble of the card icon… it was the origin of my problem

  2. My developer is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the costs.

    But he’s tryiong none the less. I’ve been using
    WordPress on numerous websites for about a year and am nervous about switching to
    another platform. I have heard great things about
    Is there a way I can import all my wordpress posts into it?
    Any kind of help would be greatly appreciated!


Leave a Comment