Closed joshm1204 closed 3 years ago
Hello @joshm1204, this is weird, I use the remote: true
+ invisible_captcha
combination in several apps with no problems. The timestamp
is automatically set up when calling the view helper:
Then, it's checked this way:
So, it seems the helper is not being called in your case, maybe browser cache? maybe some specific js in your app?
After more testing, it seems to occur after the second submit. So the first submit after the page load works, but not the second or third. It seems I may need to reload the form via ajax. Any recommendations how you would handle it?
Ok! Yep, probably the best way is to re-render the form in the ajax response, since the view helper needs to set the new timestamp in the session, as commented before:
Alternatively, you can disable the timestamp check for that action via timestamp_enabled: false
in the controller macro (you can disable it globally too via an initializer).
When I change my form to remote: true, I get the following error:
Potential spam detected for IP 127.0.0.1. Invisible Captcha timestamp not found in session.