every time i try to create content or change current content i get the error "Validation error, please try again. If this error persists, please contact the site administrator." what is the cause/fix of this

Comments

elvis2’s picture

I believe this is a browser cache issue. Make sure you don't click back and try to change the form, instead, go back then refresh, or click on the edit tab.

LenInkster-1’s picture

Are you using Suhosin to protect your PHP environment?

I was, and I got this error message whenever I tried to submit a complex page (permissions/large menu etc.etc.)

I changed the suhosin.post.max_vars to 1000 (it's in the suhosin.ini file in the conf.d folder for php (normally /etc/php5/conf.d )

This appears to NOT be a Drupal bug, just the security on your server being over enthusiastic.

steve.m’s picture

Another place where Drupal and suhosin don't get along so well is in array depth. I generally set max_vars and max_array_depth to 512.

dww’s picture

brightbold’s picture

Thanks elvis2! You solved my problem. I was getting this error trying to save changes to a block, and most instances of this issue referred to Suhosin, so I was in a panic since I'm using shared hosting and can't change those variables.

But your post made me realize that I had loaded the block editing page in my browser yesterday, so caching seemed a likely problem. I reloaded the page and pasted my changes back in and, voila, problem solved.

plato1123’s picture

Subscribing

BrianLewisDesign’s picture

Issue summary: View changes

Do a browser cache-refresh:
[Ctrl][F5] -or- [Shift] and Click the browser refresh button.

Or a direct fresh URL:
Click the address in the URL bar and hit enter to go back to the page fresh. Sometimes the refresh button keeps variables in memory that break things.