[Violation] 'requestIdleCallback' handler

9 replies · opened Jun 16, 2021

FFrancisco CignaJun 16, 2021

Hi ! how are you ? I am trying to use form.php with captcha, and in my console I get the following when i click submit:

[Violation] 'requestIdleCallback' handler took 131ms

after that i get a Captcha not validated ! in my error alert uop the toop corner.

In my contact.php page I have a form with this:

<div class="col-12 form-group">
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div class="g-recaptcha" data-sitekey="6LdzQzIbAAAAACZT27ny_8apoArwxze_GW0FnTQ2"></div>
</div>

in my form.php (under include folder). I have:
-------------------------------------------------
reCaptcha
---------------------------------------------------
/
// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = '6LdzQzIbAAAAACZT27ny_8apoArwxze_GW0FnTQ2'; // Your reCaptcha Secret

I don´t know if I miss something, thanks a lot for your replay !!
Fran:)

SSemicolon WebSTAFFJun 17, 2021

Hello,

We have tried checking out your Website and are not receiving the same error you have mentioned (see attached). But the Captcha not validated Error appears to be with incorrect reCaptcha keys or a permission error for your keys. Please make sure that your aded keys are allowed to be used on this URL, else they will be not be validated.

If you are still facing any further issues related to this even after fixing the permissions, please let us know.

FFrancisco CignaJun 17, 2021

I did it right in google I guess ,I atached an image, any suggestion ? thanks a lot.
fran:)

SSemicolon WebSTAFFJun 17, 2021

Thanks for the Update.

Can you please check if the reCaptcha Keys are for v2 Checkbox?

FFrancisco CignaJun 17, 2021

I follow the steps in the canvas documentation, there is a link to create the reCaptcha in google
The link provided is : https://www.google.com/recaptcha/about/

there is not optioon at this moment to choose what kind of version you would like to work with.
Any suggestion I guess is v3 right now
thanks a lot.
fran.

SSemicolon WebSTAFFJun 17, 2021

Yes, the Link is correct. Please check the image attached. You will find something like this.

If there is no other option, then simply consider using the contact-recaptcha-v3.html Template.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

FFrancisco CignaJun 18, 2021

Dear. sr. I put this code in my contact page beetwen form tag

<!-- captcha code -->
<div class="col-12 form-group d-none">
<input type="text" id="template-contactform-botcheck" name="template-contactform-botcheck" value="" class="sm-form-control" />
</div>

<div class="col-12 form-group">
<input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response">
<script src="https://www.google.com/recaptcha/api.js?render=6LdzQzIbAAAAACZT27ny_8apoArwxze_GW0FnTQ2"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('6LdzQzIbAAAAACZT27ny_8apoArwxze_GW0FnTQ2', {action: 'contact_page'}).then(function(token) {
// add token value to form
document.getElementById('g-recaptcha-response').value = token;
});
});
</script>
</div>
<!--end captcha code -->

please have a look online (https://www.descubrefilms.com/contacto.php), and the error message . thanks for your help.

SSemicolon WebSTAFFJun 20, 2021

Thanks for your Kind Patience and Apologies for the Delays in replying.

The issue in your Code is available in the Browser Console (see attached image). Something is definitely wrong with your API Keys which is causing this issue, as everything works fine on Our Live Previews: http://themes.semicolonweb.com/html/canvas/contact-recaptcha-v3.html . Please consider checking out the Official reCaptcha Documentation: https://developers.google.com/recaptcha/intro to see how to generate the keys and then update your keys in the HTML and include/form.php File again. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

SSemicolon WebSTAFFJun 22, 2021

The Live Previews are designed to work with reCaptcha v2 at the moment: https://themes.semicolonweb.com/html/canvas/contact-recaptcha.html . As contact-recaptcha.html and contact-recaptcha-v3.html both run on the same include/form.php File, the contact-recaptcha-v3.html File does not work because the include/form.php File has the reCaptcha v2 Secret Key. If we add the reCaptcha v3 Secret Key, it will work fine.

Hope this makes things clearer.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard