• Resolved ojasya

    (@ojasya)


    Hey Jonas

    According to your documentation , I have set Cache Lifespan to 4 hours in WP Rocket https://tinyurl.com/2xrvqyoq

    but I am still getting following error

    Error: invalid nonce. Please reload the page and try again. If the problem persists, please contact our support team.

    even after less that 4 hours after clearing cache manually

    Some time even after manually clearing cache some pages still have the issue and I have to clear cache manually again.
    Any suggestions ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jonas

    (@flinnn)

    Hi ojasya,

    can you please check if you have tried all 6 potential solutions provided in the documentation: https://www.wc-donation.com/documentation/troubleshooting/resolving-error-invalid-nonce/

    Best,
    Jonas

    Thread Starter ojasya

    (@ojasya)

    Hey Jonas @flinnn

    Thanks a lot for your reply.

    Ok following is what I tried and current status.

    1) Use a Shorter Cache Time -> Tried
    2) Disable Cache for Affected Pages -> Can’t do that, page will become extremely slow
    3) Consider a Different Caching Plugin -> Not tried , does WP ROcket has any conflicts?
    4)  Use Cache Purging -> Tried but it only fixes the issues for few hours not even for duration set 4 hours. and then issue returns.
    5) Disable Caching for Logged In Users -> Not applicable. issue is happening for loggedout users
    6) Disable Nonce Verification for the Add to Cart Endpoint -> I tried this now and it seems to have fixed the issue . Was this solution there earlier or did you just at it after by query 🙂

    But a very strange thing I noticed is that I don’t face this issue on mobile or in incognito Chrome (Desktop). and only face the issue when trying on my normal chrome. .
    I manually purge cache of that page and the all good in normal chrome as well. but after few hours.. I have issue again.. and if I try incognito, then no issue at all.
    Its very strange, no one has reported it till now , may be no one is having the issue or because of the very good handling of the error by you , ie page reloads without cache..

    so what do you think might be happening . I really appreciate your help

    Plugin Author Jonas

    (@flinnn)

    Hey,

    Glad to hear it seems to be working now! 😊

    Regarding your question, the section about disabling nonce verification has been in the documentation for a couple of months already, so nothing new was added after your query.

    From what you’re describing, my first guess would be that either:

    1. The caching plugin is also caching pages for logged-in users (even if unintentionally), or
    2. Browser caching in your normal Chrome profile is causing the issue.

    Since it works fine in incognito and on mobile, clearing your browser cache might help to confirm that.

    Best,
    Jonas

    PS: If you’ve found Donation Platform for WooCommerce helpful and would like to support the continued growth and development of this plugin, I’d truly appreciate it if you could leave a 5-star rating on ww.wp.xz.cn. Thank you so much!

    Plugin Author Jonas

    (@flinnn)

    PPS: Thanks for already writing a reply. Another note regarding caching for logged-in users: If a page of a logged-in user is cached and served to logged-out users the nonce verification will also fail.

    Thread Starter ojasya

    (@ojasya)

    Hey @flinnn

    Thanks for your help.

    All seems good now after doing that
    Disable Nonce Verification for the Add to Cart Endpoint 


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

The topic ‘Error: invalid nonce.’ is closed to new replies.