• I created a form and followed all the appropriate steps, but when I went in to test the form, I repeatedly received this message:

    {“error”:”Nonce expired, please refresh the page. If the error persists please contact the site administrator”}

    I refreshed and re-entered (3 times!) and still got this message. The form is really long, so I can’t have this happen when a client is filling it out. They’d give up pretty much on the spot.

    Any idea what’s happening?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codemonkeys

    (@codemonkeys)

    This is most likely an issue with caching.

    Wordpress uses a nonce (number used once) to help secure your site during things like form submissions and AJAX calls, although its not really a “number used once” in the traditional sense. Instead this is a hash token that can be used multiple times within a 12 or 24 hour period at which point the nonce will expire. What happens is if your cache expiration is set beyond 12 hours the nonce will also be cached resulting in a validation error as that nonce will have expired.

    There are 2 things to look at to solve this problem. The first is to check any caching plugins you may be using such as W3TC, Super Cache, Rocket Cache, etc. Go through the settings and ensure your cache expiration times are set under 12 hours. A good way to ensure this error is due to a caching plugin is to simply deactivate the plugin, clear your browser cache, reload the page and try submitting a form again. If it works with your cache plugin deactivated then you know that’s the issue and its a matter of simply setting the expiration times lower.

    If you have no cache plugin or your caching plugin is deactivated & your browser cache has been cleared and you still receive the nonce error then its almost certainly an issue with your host’s server-side caching. Cheap hosting solutions especially can have over-aggressive server-side caching as a way to keep resource usage down and keep those ridiculously low prices.

    HostGator especially has been known to have issues with this & it can often be frustrating trying to get them to address the issue. You’ll have to insist that the issue is due to their SERVER-SIDE caching which I believe is Varnish & that the expiration time either needs to be reduced to under 12 hours or disabled entirely.

    Thread Starter bananacream

    (@bananacream)

    Hi there, and thank you so much for attending to my issue.

    I solved the issue by increasing the php.ini file’s max_input_vars.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘error message’ is closed to new replies.