FriendlyCaptcha/friendly-captcha-wordpress

FluentForm Integration Issue

dev-love opened this issue · 6 comments

Hi @TheZoker

Once again, thanks a lot for your contribution! :)

We received some support requests about the FluentForm integration.

Could you help us to find out if we may have to fix something in the integation?

These were two requests about it:

Hello,

solving the captchas for the forms works so far. However, the form cannot be submitted. It says:

“Anti-robot verification failed, please try again. (captcha missing)×”

The error comes from the fluentforms html:

Anti-robot verification failed, please try again. (captcha missing)×

It also throws an error in the console:

/wp-admin/admin-ajax.php?t=1649251726080:1 Failed to load resource: the server responded with a status

Hi,

I’m having the same problem. When I test I get this message when trying to send the form:
Anti-robot verification failed, please try again. (captcha missing)

I use Fluent Forms and the Friendly Captcha for WordPress plugin. I entered the Sitekey, the API key and enabled the Fluentforms forms integration. Did I miss a step?

Thanks very much! :)

Hi @dev-love

The issue seems to be, that this is function returns an empty response:

$solution = frcaptcha_get_sanitized_frcaptcha_solution_from_post();

Since this is a friendlycaptcha function I need your help to debug this further.
Why can this be empty?

Thank you for looking into this :)

This function only looks at the form data that was just submitted (with POST), which is something wordpress (and more specifically the form plugin) is responsible for. I don't have a test environment set up at all, perhaps FluentForm sends their data differently or in a different request?

@gzuidhof Thanks for the information!
It seems that fluentforms provides the captcha solution within the $data parameter of the function.
I created a PR

@gzuidhof Thanks for the information! It seems that fluentforms provides the captcha solution within the $data parameter of the function. I created a PR

Yasss, I changed the line of code and it's working now. Thank you for looking into it 😄

Will there be a new release soon?

@TheZoker Yes, we have just released it :)