• Resolved danescobar

    (@danescobar)


    Hi,

    My checkout page throws this error anytime I want to proceed to Sandbox Paypal, making a purchase. As it involves fbevents.js and checkout.min.js it could be a bug caused by Woocommerce or PixelYourSite’s plugin which adds a FB Purchase Pixel to checkout among others. Also I’m using their other plugin for creating FB product feeds.

    The error the checkout returns after clicking on Proceed to Paypal is:

    SyntaxError: Unexpected token D in JSON at position 2

    When checking the tool XHR and Fetch the console throws these js errors:

    [DOM] Found 2 elements with non-unique id #_wpnonce
    <input type="hidden" id="_wpnonce" name="_wpnonce" value="b54635f4c7"> and eb9f44e055
    Unable to fix malformed JSON | checkout.min.js
    Resource interpreted as Document but transferred with MIME type image/gif facebook.com/tr | fbevents.js

    Also when I check findgoodhealth.org/checkout/?wc-ajax=checkout the page throws this text:

    {"result":"failure","messages":"<ul class=\"woocommerce-error\">\n\t\t\t<li>We were unable to process your order, please try again.<\/li>\n\t<\/ul>\n","refresh":true,"reload":false}

    Console doesn’t return anything.

    Thanks for the attention and I hope we can fix this.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Are you still experiencing the same issue after deactivating all of your plugins (except WooCommerce) and switching to the default Twenty Seventeen theme?

    Thread Starter danescobar

    (@danescobar)

    It occurs randomly. I’m already using Twenty Seventeen and since the errors is in fbevents.js and checkout.min.js I’m pretty sure it must be PixelYourSite interacting with Woocommerce.

    A couple of hours after I posted this message I managed to fix the Paypal redirection but I don’t know what fixed it. I tried several times deactivating WP Supercache and Autoptimize and deactivating/reactivating Paypal Sandbox in Woocommerce.

    Despite this, the XHR console errors persist and are reproducible despite the correct redirection.

    Do they give you some insight on what may be duplicating _wpnonce or why the resource is tranferring as a gif MIME type by fbevents.js? I don’t want this error to appear again at random.

    regarding checkout/ payment issues when using Autoptimize; you can always try disabling the “optimized checkout/ payment”-option in AO.

    Thread Starter danescobar

    (@danescobar)

    you can always try disabling the “optimized checkout/ payment”-option in AO

    Hi and thanks @optimizingmatters this options was already disabled. 🙂

    There is hardly a connection between the duplicate wp_nonce (recent Chrome versions started “complaining” about it for every Woocommerce install) and your error. To test things, you need to disable ALL plugins except Woocommerce, as it was suggested by RK. ALL means ALL, PixelYourSite included. If you see no error after that – it is not a Woocommerce issue.

    Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Hi there!

    We haven’t heard back from you for a couple of weeks, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    All the best!

    I’m getting this too.

    [DOM] Found 2 elements with non-unique id #_wpnonce

    Woocommerce is so poorly written and buggy and the other plugins are buggy too. When will this work without obvious bugs?

    I’m using PayPal pro

    I have this issue too.

    See:
    https://github.com/woocommerce/woocommerce/pull/18214
    We are told it will be fixed in v3.2.7.

    I too am having this issue. One of these days I will actually launch my store…as a completely bald man.

    Incidentally, things worked fine in test mode. Once I turn off test mode, this hell breaks loose. The only plugins running at WooCommerce. Nothing else.

    Another day or two of this (I’ve been in soft launch mode for 3 months) and I’ll need to start beta testing something else. Any recommendations? Shopify?

    Thanks

    • This reply was modified 6 years, 2 months ago by philhulett.

    Just started getting this error in 3.2.6 when logged out at checkout

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Unable to redirect to Paypal at checkout because of duplicate id _wpnonce’ is closed to new replies.