CaptchaBundle
CaptchaBundle copied to clipboard
Session is null after submiting a form
Hi Gregwar.
I put the captcha in a form and all goes well. The problem is when I do the submit of that form I saw that in the captchaValidator $expectedCode = $this->getExpectedCode(); is always null. I noticed that the session in this class is started but is empty.
Thanks for your time. Kind Regards
Hello, Can you check that the value is stored in the session here: https://github.com/Gregwar/CaptchaBundle/blob/master/Type/CaptchaType.php#L119 What are your settings?
The symfony version is 2.1. The value is correctly stored and I can see the next phrase that is going to be shown in the captcha. All is correct in that point, the problem is when I submit the form. My session settings are:
session:
cookie_lifetime: 360000
cookie_domain: "%base_domain%"
handler_id: ~
Thanks for your time.
I forgot to tell that I''m using memchache but the route of this form is excluded from caching.
I don't know how to help you with this. Does your sessions works for other purpose? Does manually accessing the session allow you to get the values stored from the captcha system later?