This is an odd case I’ve run into. A site I’ve had for years started throwing
this “error” when i try to make certain backend changes. It seems pervasive –
If i try to install, update, activate or deactivate any plugin. I can still look at the list of plugins and view their settings, generally.
Any thoughts on where to start looking?
This particular message happens when a nonce check fails.
I’d say the likely cause is a conflict with the referer (as part of nonce security, WP checks to see if the referer was an admin page on the same domain & path).
You can rule this out by defining a custom function in
wp-config.php
:This implements the standard nonce check, but skips the referer part. If it cures the error message, we’ve isolated the problem and can work towards a permanent fix.
Further reading on the two primary types of errors (this, and insufficient permissions).
I ran into this problem when implementing ‘on_activation’ code and needed to see my output mid-development. Well, this is a big no-no and even with an ‘exit’ statement, wordpress (4) was showing “Are you sure you want to do this?” instead of my dump. @TheDeadMedic’s suggestion got pointed in the right direction, but didn’t work in my particular case. I put the following into my wp-config.php
This will basically kill a bunch of otherwise useful security stuff.
BTW – I was following this sample (https://wordpress.stackexchange.com/a/25979/8972) by @kaiser for activating a plugin.
I have fix this issue in my site for set bellow value in php.ini file
may be this useful.
I’ve discovered this can also happen if a
check_admin_referer()
function is being called with invalid arguments somewhere in your site. If you’re getting this error and cant find the problem, check your use ofcheck_admin_referer()
throughout your theme and plugins.I started getting this error right after I created a new admin options page for my theme. I had added a
check_admin_referer()
inside a new class, and accidentally swapped the 1st and 2nd parameters. I didn’t get any error messages from the class itself, but it mysteriously started affecting the saving of options and profiles in pages that didn’t even load or call the class I had created. Fixing my call tocheck_admin_referer()
immediately solved the problem.