Invisible ReCaptcha issues with Captcha module and CGBetterforms Topic is solved

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
slick
Forum Members
Forum Members
Posts: 17
Joined: Fri Mar 03, 2017 8:54 am

Invisible ReCaptcha issues with Captcha module and CGBetterforms

Post by slick »

Dear CMSMS experts,

I have a form built in CGBetterForms (1.10.4) that works fine with the HN Captcha method from the Captcha module (v1.0). We still got some spam with that so I wanted to try the Invisible ReCaptcha that I previously successfully used on other sites.

After making the switch to Invisible ReCaptcha I now always get the "Sorry, incorrect captcha value" error (the page is in German, hence a different text shows). I have the same issue on more than one form.

Here is my form:
https://arbatherm.ch/test

The template is very simple:

Code: Select all


{cgbf_form_errors assign='errors'}
{if !empty($errors)}
  {foreach $errors as $err}
    <div class="uk-alert-danger uk-margin-medium" uk-alert><span uk-icon="warning" class="uk-margin-right"></span> {$err}</div>
  {/foreach}
{/if}

<form id="kontakt">

  <div class="row">
     <label for="name" hidden>Name</label>
     <input id="name" class="form-control" type="text" name="name" placeholder="Vorname Nachname" required>
  </div>

  <div class="row">
     <label for="email" hidden>Email</label>
     <input id="email" class="form-control" type="email" name="email" placeholder="Email-Adresse" required>
  </div>
  
  <div class="row">
     <label for="telefon" hidden>Telefon</label>
     <input id="telefon" class="form-control" type="tel" name="telefon" placeholder="Telefon (optional)">
  </div>
  
  <div class="row">
     <label for="betreff" hidden>Betreff</label>
     <input id="betreff" class="form-control" type="text" name="betreff" placeholder="Betreff" required>
  </div>

  <div class="row">
     <label for="anliegen" hidden>Anliegen</label>
     <textarea id="anliegen" class="form-control" name="anliegen" rows="5" placeholder="Beschreiben Sie Ihr Anliegen" required></textarea>
  </div>
  
  <div data-cgbf-captcha>{* captcha will be appended here *}</div>
  <div data-cgbf-captcha-input>{* captcha input field, if necessary will be appended here *}</div>

  <div class="row">
    <button type="submit" class="fbsubmit">Absenden</button>
  </div>
</form>

Of course, any help would be much appreciated. I would also be willing to donate/pay for development work on the Captcha module, maybe with an integration of ReCaptcha 3 or other effective spam prevention.

Best,
slick
slick
Forum Members
Forum Members
Posts: 17
Joined: Fri Mar 03, 2017 8:54 am

Re: Invisible ReCaptcha issues with Captcha module and CGBetterforms

Post by slick »

My issue is most likely related to bad PHP settings. This thread viewtopic.php?f=4&t=81753 mentioned checking for "allow_url_fopen" in php.ini -> I will check this on various installations and report back.

cyon.ch (good host with great default settings): works
hostfactory.ch (ok host with options): works after config
hostpoint.ch (bad host): have to go through support
vtx.ch (awful host): have to go through support
markS
Forum Members
Forum Members
Posts: 56
Joined: Wed Aug 20, 2008 3:04 pm

Re: Invisible ReCaptcha issues with Captcha module and CGBetterforms

Post by markS »

Hello,

I tried multiple solutions but never got invisible Recaptcha & CGBetterForms to work properly. Although I quite liked the way the templates are handled in CGBF, I went back and setup the form in FormBuilder and it works as intended. I didn't find my php.ini settings affected it.

I'd be interested in hearing if anyone has ever got it to work.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Invisible ReCaptcha issues with Captcha module and CGBetterforms

Post by DIGI3 »

I've been using invisible reCaptcha with CGBF and haven't run into any issues (other than the allow_url_open one already mentioned). I did have to make some adjustments to the javascript validation (Abide) I was using, but that wasn't related to out of the box CGBF.

I just did a quick test out of the box with the sample contact form in CGBF with an invisible captcha v2 and it worked fine.
Not getting the answer you need? CMSMS support options
slick
Forum Members
Forum Members
Posts: 17
Joined: Fri Mar 03, 2017 8:54 am

Re: Invisible ReCaptcha issues with Captcha module and CGBetterforms

Post by slick »

Thanks for your input. Do you have any guess if the following PHP functions make a difference?

passthru, exec, system, popen, shell_exec, proc_open, proc_close, proc_get_status, proc_nice, proc_terminate, symlink

I suspect symlink to interfere, because I have it working on an install with these functions disabled:

eval, exec, shell_exec, system, dl, passthru, proc_open, proc_close, popen, opcache_get_status
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Invisible ReCaptcha issues with Captcha module and CGBetterforms

Post by DIGI3 »

No idea. If it was something like that your error log should give you some details.
Not getting the answer you need? CMSMS support options
slick
Forum Members
Forum Members
Posts: 17
Joined: Fri Mar 03, 2017 8:54 am

Re: Invisible ReCaptcha issues with Captcha module and CGBetterforms

Post by slick »

After a lot of experimentation I decided to remove the ReCaptcha account and create a new one and with the new key it suddenly worked.

Still not really happy with any of the Captcha solutions I have tried. I might have a look at https://www.hcaptcha.com in the future as it seems more privacy focused.

I'm of course open to any suggestions as to effective and non-invasive form protection.
Post Reply

Return to “Modules/Add-Ons”