Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Ajax check nonce failed
Avatar
Steve20
Member
sp_UserOfflineSmall Offline
Sep 16, 2015 - 6:25 pm

I tried to respond to a post on my forum today and every time I try I get this error message "Ajax check nonce failed"   My post does not get posted and it kicks me out to the login screen.  aI am logged in when this happens and Simplepress says I am logged in.   Has anyone had this happen to you?  Any idea what is causing it?    Thanks, Steve

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 16, 2015 - 6:47 pm

Hey Steve,

If this has just started happening today, what has changed? Have you installed any new WP plugins for example or updated anything in particular?

When Ajax calls are made the nonce being a unique number carried with your login is checked, so it's possible if you're running a security or even membership plugin that doesn't quite play by the rules then it's possible I guess that the data is being interfered with in some way, I'm no expert on the subject though.

Are you getting any similar behaviour with any other WP plugins or WP itself?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 17, 2015 - 3:28 am

I can expand a ;little on what Ike has said with a possible reason for what you saw happening.

A 'nonce' - a core WordPress security measure - is generated with each page submission. And then checked when the submitted page is processed. Then - as Ike says - there is the one generated for login. But this nonce has a built-in expiry time. I seem to remember it used to be something like 12 hours but I believe the WP team may have shortened it. You may have experienced a login box suddenly opening up requiring you to log back in. If so then that was he login nonce expiring!

Now a possible scenario for your experience is where you had the forum open at a particular topic and it remained open for a while which allowed the page/form nonce to expire. You then type in a post and try to save ot and end up with the message you saw. If you then pressed the back button on the browser to try again you would go around in circles. Could that have been what happened?

One of the issues we have which is not ideal bit beyond our control I believe - is that if the page nonce itself has expired or is invalid - WordPress reports that the user has been logged out and forces us to abandon the posting attempt.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Steve20
Member
sp_UserOfflineSmall Offline
Sep 17, 2015 - 11:27 am

I think it has something to do with a caching plugin WP Rocket.  I disabled it and the Nonce message went away and I could post.  Reenabled it and my post disappeared and I couldn't post again.  You can choose to not cache certain pages on the site so I put in the forum page and now it seems to be working.    Thanks

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 17, 2015 - 11:44 am

Excellent news.. As a matter of course the forum should be excluded from all caching.

Thanks for letting us know.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625