ReCaptcha never validates

Don't know why it's not giving any error response. Try this, around line 356 in ./plugins/fabrik-element/captcha/captcha.php, right before the enqueueMessage, but a var_dump ...

Code:
                    if (FabrikHelperHTML::isDebug())
                    {
                        $msg = "noCaptcha error: ";
                        foreach ($resp->getErrorCodes() as $code) {
                            $msg .= '<tt>' . $code . '</tt> ';
                        }
var_dump($msg);exit;
                        $this->app->enqueueMessage($msg);
                    }
                    return false;

-- hugh
 
Damn. I'm stumped? I've got the two debugs switched on now with protostar assigned to the page, any chance I can convince you to take a peak? Maybe whatever is preventing it from validating is also preventing it from showing with my Helix3 template?

I've been peeking.

-- hugh
 
Thanks for peeking!

I still only get an empty array :/

I have JCE installed, Phoca Maps and Simple Image Gallery. Don't think that has anything that could interfere?

Helix also installs a plugin. Maybe the JS and CSS compression has something to do with it?

*edit, also AllVideos installed.
 
No I get the form returned with the debug tabs.

I see there is one entry in the array now:

[xxx_xxx_xxx___recaptcha] => Array
(
[0] => Array
(
[0] => Validation failed
)

)
 
Do you have a juser form plugin on this? If so, try turning it off. Just a Hail Mary, I have no reason to think it would affect anything, but try it.
 
With that code I asked you to put in, that should short circuit the form submission, and just render a blank page with some debug output. Which means that the recaptcha validation simply isn't running.

-- hugh
 
Which, if you have a juser plugin on the form, could potentially be because that isn't configured correctly.

-- hugh
 
I just want to point out, twice now the NoCaptcha asked me for additional validation, checking pictures... so that part does communicate with Google.
 
Dunno, try turning it off. Doubt it. Watching the submit in Chrome's devtools, your g-recaptcha-response is getting submitted with the form.

-- hugh
 
Did I add this correctly?

Code:
if (FabrikHelperHTML::isDebug())
                    {
                        $msg = "noCaptcha error: ";
                        foreach ($resp->getErrorCodes() as $code) {
                            $msg .= '<tt>' . $code . '</tt> ';
                        }
                        var_dump($msg);exit;
                        $this->app->enqueueMessage($msg);
                    }
                    return false;
 
I got it to validate!!! I had Validations/notempty switched on for the recaptcha field. Just switched it off and it validated.

Unfortunately it still does not make that element show in my Helix3 template. :/
 
This is what I see in the source when I enable NoCaptcha.

Code:
<div class="control-group fabrikElementContainer plg-captcha fb_el_xxx___recaptcha  fabrikDataEmpty   span12">
    <span style="display:none">
        <label for="xxx___recaptcha" class="fabrikLabel control-label fabrikEmptyLabel">
    &nbsp;        </label>
    </span>


<div class="fabrikElement">
   
<script>
var onloadCallback = function() {
    grecaptcha.render('xxxx___recaptcha', {
        'sitekey' : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    });
};
</script>

<div class="captcha_input" id="xxx___recaptcha">
</div>

<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&amp;render=explicit&amp;hl=en" async="" defer=""></script>
</div>

<div class="fabrikErrorMessage">
    </div>


</div>
 
Hugh, just one more thing I can think of. I also have SP PageBuilder installed. I forgot, that is not strictly part of the Helix3 templates, but it does form part of their framework. I had a problem once on a different site with a MooTools conflict with one of their templates. You still gave me a css class to add to the specific module that fixed the conflict.

Just thinking out loud here....
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top