andrewlimaza / caldera-forms-anti-spam

Caldera Forms Anti Spam WordPress plugin. This adds Google's reCAPTCHA field to your Caldera Form.
https://wordpress.org/plugins/cf-anti-spam/
25 stars 16 forks source link

Validate email error: 'The captcha wasn't entered correctly. Reset.' #12

Closed andyburnsco closed 4 years ago

andyburnsco commented 5 years ago

Do You Need Immediate Help?

Is This A Feature Request?

What Version Of Caldera Forms, WordPress and PHP Are You Using?

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

Yes, tested with 2019 Theme. Active: Caldera Forms 1.8.4, Caldera Forms Anti Spam 0.1.2, Verify Email for Caldera Forms 1.2.0.

What Is The Unexpected Behaviour?

Please explain what you did

  1. You go here to sign up: https://lpky.org/membership/signup/
  2. You fill out the form.
  3. You checkbox the recaptcha (note: invisible recaptcha gives same error).
  4. You click the "Submit"
  5. It sends you a confirmation email.
  6. You click the link in the confirmation email.

what you expected to happen

and what happened instead.

validate-email-catpcha-error

Apparently the recaptcha breaks the rest of these aforementioned steps that should occur.

What PHP Errors Have You Logged While Reproducing This Bug?

What JavaScript Errors Have You Seen While Reproducing This Bug?

andrewlimaza commented 4 years ago

Would you mind moving over to V3 reCAPTCHA, this should resolve the issue.

andyburnsco commented 4 years ago

Tested V3 and it results in the same behavior.

The captcha wasn't entered correctly. Reset.

The form does not get submitted. I believe formerly the data would be entered.

ecaron commented 4 years ago

@andyburnsco , would you feel comfortable trying my PR (https://github.com/andrewlimaza/caldera-forms-anti-spam/pull/21)? I believe it fixes the issue that you're experiencing.

dupovacemir commented 3 years ago

Hi @ecaron ! I'm having identical problem with both v2 and v3. I downloaded "test" branch instead of "master", but the same issue persist. Should I try something else? Regards

ecaron commented 3 years ago

@dupovacemir If you try the master branch of https://github.com/coffeeandbagels/caldera-forms-anti-spam, does it work for you?

dupovacemir commented 3 years ago

I tried v2 and v3 with mail validation from that branch.

V3 didn't passed submission because of javascript error: image

V2 passed submission, but still got the same as the current issue.

dupovacemir commented 3 years ago

Okay, so I think I bypassed this error. Basically after the email validates, caldera tries to submit form again, but fails after recaptcha is not validated because no input occurred. So I thought that we could check GET parameters for email validation which are: "validatetoken" and "cf_tp". For exaple this is validation url: https://localhost:3000/?validatetoken=856f193a500e566b48533f16006ab05fea07be93&cf_tp=_cf_process_5fed17bb6f354_

If those parameters are set, we can just disable captcha and the form submits normally. I understand that this is probably amateur solution, I apologize, but it worked. :D

Below is the code: `/**