Page 1 of 1

PHP error

Posted: Wed Oct 05, 2022 9:32 pm
by clivem
hi all,

my contact us form is not working ( customer pointed this out today) yet it has been fine and there have been no changes made, mods or changes to any extensions. in looking into it i see i am getting a recurring error in my error log file :
PHP Notice: Undefined index: g-recaptcha-response in /home/domain_name/public_html/shop/catalog/controller/extension/captcha/google_captcha.php on line 27

this is line 27 :
$recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($this->config->get('google_captcha_secret')) . '&response=' . $this->request->post['g-recaptcha-response'] . '&remoteip=' . $this->request->server['REMOTE_ADDR']);

I have uninstalled captcha, checked keys and recopied them in, re-enabled it -
strange thing is even when Re-captcha is uninstalled so not there - i tried the contact us page and still get

ERROR - PAGE NOT WORKING.

so i am not convinced its the captcha - or is there something obvious to anyone?

Re: PHP error

Posted: Wed Oct 05, 2022 10:21 pm
by xxvirusxx

Re: PHP error

Posted: Wed Oct 05, 2022 11:05 pm
by straightlight
OC version. Take note that the suggested bug-fix solution on the above has already been added in recent OC versions which includes the opencart-3 repository on Github.

Re: PHP error

Posted: Thu Oct 06, 2022 7:11 pm
by paulfeakins
clivem wrote:
Wed Oct 05, 2022 9:32 pm
my contact us form is not working ( customer pointed this out today)
You should test your contact form every week.