0

I have a form that I am using in a block that was generating the error:

Validation error, please try again. If this error persists, please contact the site administrator

Doing some research shows that it is to do with $session mismatches with the form token that cause this error.

Further to this I noticed that a default value I was using from the $user variable wasn't updating when I changed login.

Both of these together led me to the realisation that my block was being cached (confirmed by debugging and seeing that my form builder function was only being called after I cleared caches) so I changed caching of my block to 'BLOCK_NO_CACHE'.

I am still getting the error and my $user isn't updating. Any ideas?

1 Answer 1

2

Just to answer my own question. In this answer to another question, Berdir mentions that Drupal 6 will not update your block information. The example given to do it in code is here but I just updated the cache field to -1 (BLOCK_NO_CACHE) in the blocks table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.