solution to invalid-request-cookie reCaptcha problem
I’m posting this merely as an aide memoire to myself and also in case it helps anyone tearing their hair out regarding a reCaptcha form that was refusing to pass variables over.
I had a form on an old site using tables. On one page the recaptcha form worked well. On another, the reCaptcha was failing due to invalid-request-cookie. On further investigation, it turns out that reCaptcha form wasn’t passing any form variables to the next page, even though the rendered HTML on the page had the form input fields in the correct place.
To cut a long story short (too late), I noticed that the form declaration was inside a table – ie <table><form name=”form-with-recaptcha-in-it”…..</form></table> which isn’t valid HTML.
Swapping the form to be positioned outside the table worked first time.
Many thanks for this… it saved me tearing all my hair out!
Thanks for this. I was struggling to understand what was happening and your post saved me from hours of debugging. I wish error messages made more sense (to me at least)!