Getting the following in the dev tools console and the recaptcha control is not rendering.
reCAPTCHA couldn't find user-provided function: loadReCaptchas
Recently upgraded from Sitecore 9.0.2 to 10.2. We upgraded the Sitecore Forms Extensions to version sc10.1-4.0.2
. The ReCaptcha control will not load. On Content Management servers I am able to view the ReCaptcha image but the control itself will not load when viewing the form on a page.
When debugging, the output from the Recaptcha.cshtml looks like the following:
<div id="fxb_fe2d6775-2160-428c-9065-8e3f7565b206_Fields_d4073a01-591d-4e0d-8d09-2dc6d78e83a4__CaptchaValue_wrapper"></div>
<input id="fxb_fe2d6775-2160-428c-9065-8e3f7565b206_Fields_d4073a01-591d-4e0d-8d09-2dc6d78e83a4__CaptchaValue" name="fxb.fe2d6775-2160-428c-9065-8e3f7565b206.Fields[d4073a01-591d-4e0d-8d09-2dc6d78e83a4].CaptchaValue" type="hidden" class="fxt-captcha" data-val-required="Please confirm you are not a robot." data-val="true" />
<span class="field-validation-valid" data-valmsg-for="fxb.fe2d6775-2160-428c-9065-8e3f7565b206.Fields[d4073a01-591d-4e0d-8d09-2dc6d78e83a4].CaptchaValue" data-valmsg-replace="true"></span>
<script type="text/javascript">
var reCaptchaArray = reCaptchaArray || [];
reCaptchaArray.push(
function() {
var _captchaInput = window.document.getElementById('fxb_fe2d6775-2160-428c-9065-8e3f7565b206_Fields_d4073a01-591d-4e0d-8d09-2dc6d78e83a4__CaptchaValue');
window.grecaptcha.render('fxb_fe2d6775-2160-428c-9065-8e3f7565b206_Fields_d4073a01-591d-4e0d-8d09-2dc6d78e83a4__CaptchaValue_wrapper',
{
'sitekey': 'REMOVED-PROPERLY-ADDED',
'callback': function(token) {
_captchaInput.value = token;
},
'expired-callback': function(args) {
_captchaInput.value = '';
}
});
}
);
</script>
<script src="https://www.google.com/recaptcha/api.js?onload=loadReCaptchas&render=explicit&hl=en" async defer></script>
Any hints on what could be preventing the control from loading properly? screenshot of the message in Console: