• Resolved scottmotion

    (@scottmotion)


    I am trying to implement the shop however I get this error when attempting to purchase:
    {“success”:false,”data”:{“error”:”missing_nonce”}}

    When I click the link it goes to /cart/ with the message above. Sometimes It will proceed if I open the inspector with Disable Cache checked, but not always.

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello @scottmotion ,

    Can’t reproduce your error. Could you let me know which version of Download Monitor do you have?

    Warmly,
    Razvan

    Thread Starter scottmotion

    (@scottmotion)

    I have been using the latest version, 4.7.60 at the time of testing. I tried testing on my phone and it just goes straight to an empty cart. If you were not able to reproduce this error can you please tell me what did happen when you tried to purchase? I don’t see any completed orders…

    Plugin Author Cristian Raiber

    (@cristianraiber-1)

    @scottmotion – I just (successfully) finished a purchase on your website.

    Can you please check your latest order? You should be able to find it easily, my order ID is 2 (2nd order), and you can easily spot my name.

    P.S.: I could also (successfully) download the file that’s being sold. It’s a PDF …

    Thanks
    /Cristian.

    Thread Starter scottmotion

    (@scottmotion)

    Yes I see your order for the pdf. However I’m still having the issue when I try, I either get that error or it goes straight to an empty cart. I did notice that when I get the error then refresh the page it appears to work, but after more shopping it becomes apparent that the cart isn’t working. I have tried several devices, local and cell network, incognito, etc. Do you know what would throw this “missing_nonce” error? I can’t find any information about it.

    Hello @scottmotion ,

    Do you have any caching system activated?

    Warmly,
    Razvan

    Thread Starter scottmotion

    (@scottmotion)

    I have disabled and removed all caching I could find, including old folders and database entries. I tested on yet another iPhone and still had the problem. I even disabled all extensions and purged Chrome on my PC, but with no success.

    I would like to add that I am moving this content to a new site which I have started to setup and it is experiencing the same problem. Different themes, same host. Could it be some host setting or something like my htaccess file? I have disabled mod_security according to my cPanel.

    • This reply was modified 3 years, 5 months ago by scottmotion.
    • This reply was modified 3 years, 5 months ago by scottmotion.

    The problem seems to be coming from the XHR, but I don’t really understand why it is not adding the nonce to the request, only from time to time. Removing the class download-button from the a element will trigger the default behavior and the problem will be gone, but that is just a temp solution. I’ve created a ticket here and we’ll search for a solution.

    In the mean time, if you could override the template and remove the class download-button from download-monitor/templates/shop/add-to-cart.php ( little doc here ) it should solve your problem.

    Warmly,
    Razvan

    Thread Starter scottmotion

    (@scottmotion)

    Ok I will try it, however I don’t see the file you specified in that directory. I see download-monitor/templates/shop/cart.php, or download-monitor/templates/shop/button/add-to-cart.php

    Yes, sorry, forgot the button directory šŸ˜€

    Thread Starter scottmotion

    (@scottmotion)

    I made the modification and uploaded the file to /wp-content/themes/my-theme-name/download-monitor/add-to-cart.php however the class is still being applied. Do I need to replicate the folder structure as well?

    Hey @scottmotion ,

    Please move the file to /wp-content/themes/my-theme-name/shop/button/add-to-cart.php in order for this to work. Seems we need to update our documentation, sorry for that.

    Please let me know if this worked for you.

    Warmly,
    Razvan

    Thread Starter scottmotion

    (@scottmotion)

    That worked to get rid of the error and now it proceeds to the cart page! However if I try to remove items from the cart or navigate around it breaks the cart. Then I have to go into the db and delete the session and wipe the browser cache which resets the cart, but it always breaks again. Basically it seems to work on a new user’s first visit but will break if they try to modify the cart or leave the site.

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

The topic ‘Missing_nonce’ is closed to new replies.