• Resolved linux4me2

    (@linux4me2)


    First, thank you to the developer(s) for a very nicely designed and functioning plugin.

    Today, I uninstalled the previous reCAPTCHA-based login security plugin on several Woocommerce sites and set up Simple Cloudflare Turnstile. The plugin works well on all but the older, non-block-enabled Twenty Ten and Arcade Basic themes which were using the Cart Block. On those sites, when the Cart page was visited, all the user got was the spinning throbber and the Cart did not display.

    It looks like the problem is a JavaScript conflict with the Cart Block on those themes:

    Uncaught (in promise) TypeError: turnstileItem is null
    unsubscribe https://thedomain.com/wp-content/plugins/simple-cloudflare-turnstile/js/integrations/woocommerce.js:28
    r https://thedomain.com/wp-includes/js/dist/data.min.js:2
    instantiate https://thedomain.com/wp-includes/js/dist/data.min.js:2
    v https://thedomain.com/wp-includes/js/dist/data.min.js:2
    k https://thedomain.com/wp-includes/js/dist/data.min.js:2
    a Redux
    U https://thedomain.com/wp-includes/js/dist/data.min.js:2
    D https://thedomain.com/wp-includes/js/dist/data.min.js:2
    s https://thedomain.com/wp-includes/js/dist/data.min.js:2
    setTimeout handler*s https://thedomain.com/wp-includes/js/dist/data.min.js:2
    i https://thedomain.com/wp-includes/js/dist/data.min.js:2
    v https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    p https://thedomain.com/wp-includes/js/dist/data.min.js:9
    __unstableMarkListeningStores https://thedomain.com/wp-includes/js/dist/data.min.js:2
    a https://thedomain.com/wp-includes/js/dist/data.min.js:2
    p https://thedomain.com/wp-includes/js/dist/data.min.js:9
    Je https://thedomain.com/wp-includes/js/dist/data.min.js:9
    Qe https://thedomain.com/wp-includes/js/dist/data.min.js:9
    Ye https://thedomain.com/wp-includes/js/dist/data.min.js:9
    v https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    b https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    React 11
    i https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    l https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    l https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    a https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    d https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:33
    u https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/wc-cart-checkout-base-frontend.js:1
    8349 https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js:1
    l https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js:1
    n https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js:1
    O https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js:1
    <anonymous> https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js:1
    <anonymous> https://thedomain.com/wp-content/plugins/woocommerce/assets/client/blocks/cart-frontend.js:1
    woocommerce.js:28:17

    On other sites the Cart Block works just fine.

    The workaround on the affected sites was to switch the Cart Page from the Cart Block to the Woocommerce Cart shortcode:

    [woocommerce_cart]

    Using the shortcode, the JavaScript error didn’t occur and the Cart displays fine.

    The Checkout Block appears to be working fine.

    I’d like to be able to use the Cart Block and Simple Cloudflare Turnstile even on these old, non-block-enabled themes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter linux4me2

    (@linux4me2)

    It turns out that the problem appears to be due to the Turnstile implementation (Turnstile shortcode added to the form) of a MC4WP (Mailchimp for WordPress) form appearing in a widget on the same page as the Cart Block. If I remove the Turnstile shortcode from the MC4WP form, I can use the Cart Block on both the Twenty Ten and Arcade Basic themes.

    I’m going to mark this as resolved because I can live without the Turnstile implementation on the Mailchimp form. The sites weren’t receiving any spam registrations, anyway. (Fingers crossed.)

    I’m having the same issue but the error occurs on the WooCommerce checkout page with the Clover Gateway Plugin which now requires blocks so I can no longer use short code. This is totally broken and I can say that attacks have not been successful while using this plugin and I hate to switch to something else.

    I’ve also just discovered problems that seem to trace back to Turnstile. I’m using a plugin called CheckoutWC and with Turnstile plugin activated, the checkout form doesn’t load at all, and I have trouble adding items to the cart. I know it’s Christmas, but is there a fix for this yet?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Woocommerce Cart Block Fails on Older, Non-Block Enabled Themes’ is closed to new replies.