reCAPTCHA response empty for page translated with GTranslate

34 views Asked by At

The reCAPTCHA response is empty and therefore not valid. The empty response only happens after switching to another language by the use of GTranslate. The default language works!

The JS function is called for the preventDefault and the execution of reCAPTCHA. What possible reasons might be here why I get an empty response?

$recaptchaResponse = $request->request->get('g-recaptcha-response');

if (null === $recaptchaResponse) {
         $form->addError(new FormError('Recaptcha not valid'));
         
         // *** SO IT ENDS UP HERE ***
         $this->logger->error("reCAPTCHA response is empty");
}

Any ideas? I will be happy with any kind of tips. Thanks in advance!

Greetings, Demi

I checked what kind of data I got in the response, it was empty. And I checked if the JS function was executed, it was.

0

There are 0 answers