s01e05 - Google Recaptcha QUESTIONS/SUPPORT
-
zeeshop
- Member
- Posts: 71
- Joined: Sun Jan 10, 2021 11:30 pm
- Phoenix Version:
- Has thanked: 15 times
- Been thanked: 2 times
Re: s01e05 - Google Recaptcha
Hi,
Since installing this getting the below error on Create account page, and not creating an account:
Same for COntact us page/ not sending messages:
Thanks
Since installing this getting the below error on Create account page, and not creating an account:
Same for COntact us page/ not sending messages:
Reffered Line 52 is as below:Notice: Undefined index: error-codes in /homepages/31/*********/htdocs/*********/includes/hooks/shop/siteWide/addRecaptcha.php on line 52
Notice: Trying to access array offset on value of type null in /homepages/31/*********/htdocs/*********/includes/hooks/shop/siteWide/addRecaptcha.php on line 52
Warning: constant(): Couldn't find constant in /homepages/31/*********/htdocs/*********/includes/hooks/shop/siteWide/addRecaptcha.php on line 52
Code: Select all
$GLOBALS['messageStack']->add('header', constant($result['error-codes'][0]), 'error');-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: s01e05 - Google Recaptcha
You could change that line tozeeshop wrote: ↑Sat Jan 08, 2022 12:51 pmCode: Select all
$GLOBALS['messageStack']->add('header', constant($result['error-codes'][0]), 'error');
Code: Select all
$GLOBALS['messageStack']->add('header', isset($result['error-codes'][0]) ? constant($result['error-codes'][0]) : $curlData, 'error');Code: Select all
public $_sitekey = '';
public $_secret = '';-
zeeshop
- Member
- Posts: 71
- Joined: Sun Jan 10, 2021 11:30 pm
- Phoenix Version:
- Has thanked: 15 times
- Been thanked: 2 times
Re: s01e05 - Google Recaptcha
Thanks @ecartz
After editing to the suggestion getting below message:
I have followed the instructions and entered the site/ secret key as required.
After editing to the suggestion getting below message:
Message not sent/ or account not created.{ "success": true, "challenge_ts": "2022-01-08T15:30:01Z", "hostname": "www.mysite.com" }
I have followed the instructions and entered the site/ secret key as required.
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: s01e05 - Google Recaptcha
You could try changing this line: to (Remove two apostrophes around true.)
If that doesn't work, before the messageStack line, try addingThat will really break it, but hopefully give useful feedback.
Code: Select all
if ($result['success'] === 'true') {Code: Select all
if ($result['success'] === true) {If that doesn't work, before the messageStack line, try adding
Code: Select all
var_dump($result);exit();-
zeeshop
- Member
- Posts: 71
- Joined: Sun Jan 10, 2021 11:30 pm
- Phoenix Version:
- Has thanked: 15 times
- Been thanked: 2 times
Re: s01e05 - Google Recaptcha
The last change fixed the issue.
Another thing I am noticing is when the box for Recaptcha is not ticked the warning is coming as below.
Seems like the message from the language file is not triggering/ appearing as required.
Language file is showing:
Many Thanks
Another thing I am noticing is when the box for Recaptcha is not ticked the warning is coming as below.
Seems like the message from the language file is not triggering/ appearing as required.
Language file is showing:
Code: Select all
define('missing-input-response', 'We cannot detect a Recaptcha - did you tick the box?');
define('invalid-input-response', 'Sorry, something has gone wrong with Recaptcha, please email us instead.');
define('missing-input-secret', 'Recaptcha: Missing Secret');
define('invalid-input-secret', 'Recaptcha: Invalid Secret');Many Thanks
You do not have the required permissions to view the files attached to this post.
- tessthepup
- Certified Developer
- Posts: 382
- Joined: Mon Mar 01, 2021 5:55 pm
- Phoenix Version:
- Has thanked: 47 times
- Been thanked: 62 times
Re: s01e05 - Google Recaptcha
Hi Guys,
Just wondering if anyone is using this on a 1.0.8.20 store as I am having an issue.
The contact us form submits without the recaptcha ticked box being ticked
Thanks
Mark
Just wondering if anyone is using this on a 1.0.8.20 store as I am having an issue.
The contact us form submits without the recaptcha ticked box being ticked
Thanks
Mark