Results 1 to 10 of 694

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,925
    Plugin Contributions
    96

    Default Re: Support Thread for Google reCAPTCHA plugin

    NOTE: if you're running the unsuffixed version of zc157 without having installed the known patches (https://www.zen-cart.com/showthread....v1-5-7-series) could be part of the problem.

    That initial version had a bug that prevented multiple 'observers' from watching the same event, which might have play in the issue reported.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by lat9 View Post
    NOTE: if you're running the unsuffixed version of zc157 without having installed the known patches (https://www.zen-cart.com/showthread....v1-5-7-series) could be part of the problem.

    That initial version had a bug that prevented multiple 'observers' from watching the same event, which might have play in the issue reported.
    Yes, important point!
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by lat9 View Post
    NOTE: if you're running the unsuffixed version of zc157 without having installed the known patches (https://www.zen-cart.com/showthread....v1-5-7-series) could be part of the problem.

    That initial version had a bug that prevented multiple 'observers' from watching the same event, which might have play in the issue reported.
    I was looking for that post when I did by tests... maybe that helped in my testing, but also found it was easy to add another page to the notifier group to add Get-a-Quote to reCAPTCHA.. Could be the answer for the FEC question..

    Just to post this again, Both ZC1.5.7b and ReCAPTCHA performed as expected. When testing URL in the comment, reCAPTCHA passed it to ZC1.5.7b and ZC stopped it dead. Which is what I would expect for reCAPTCHA is only testing for a click and not what's in the message...
    Dave
    Always forward thinking... Lost my mind!

  4. #4
    Join Date
    Dec 2020
    Location
    UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Thanks to the last few posts (cheers Dave) I've had a lighbulb moment and fixed recaptcha with FEC

    Because FEC doesn't use the default zencart register page - it uses the login page as a split register / login page the observer wasn't looking for the recaptcha on that page

    In includes/classes/observers/class.google_recaptcha.php

    Add $pages_to_check[] = 'NOTIFY_LOG_IN_CAPTCHA_CHECK'; to the array of pages to check so it becomes:

    Code:
    	function __construct() {
    
    		//comment out any pages you do NOT want to check
    		$pages_to_check[] =  'NOTIFY_CONTACT_US_CAPTCHA_CHECK';
    		$pages_to_check[] =  'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK';
    		$pages_to_check[] =  'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK';
    		$pages_to_check[] =  'NOTIFY_LOG_IN_CAPTCHA_CHECK';
    		$this->attach($this,$pages_to_check);
    	}
    Then in the same file update the following

    Code:
    if (!$resp->isSuccess()) {
    			$event_array = array('NOTIFY_CONTACT_US_CAPTCHA_CHECK' => 'contact', 'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK' => 'create_account', 'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK' => 'review_text', 'NOTIFY_LOG_IN_CAPTCHA_CHECK' => 'create_account');
    			$messageStack->add($event_array[$eventID], $resp->getErrors());
    			$error = true;
    		}
    This now seems to be working fine - although there is no error is you don't tick the recaptcha? (must have missed something)

  5. #5
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by raindrop99 View Post
    Because FEC doesn't use the default zencart register page - it uses the login page as a split register / login page the observer wasn't looking for the recaptcha on that page
    Taking a quick look at FEC, to does have the NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK built in, it also seems to be doing it's own looking for a captcha.php class, so more then likely some other things going on here.

    To get the message change 'create_account' to 'login'...
    Dave
    Always forward thinking... Lost my mind!

  6. #6
    Join Date
    Dec 2020
    Location
    UK
    Posts
    6
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by davewest View Post
    Taking a quick look at FEC, to does have the NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK built in, it also seems to be doing it's own looking for a captcha.php class, so more then likely some other things going on here.

    To get the message change 'create_account' to 'login'...
    Thanks Dave,

    I've changed the create_account to login and I still don't get an error message when recaptcha fails? Any ideas please?

    This is what I changed
    Code:
    'NOTIFY_LOG_IN_CAPTCHA_CHECK' => 'login'
    Zen Cart 1.5.4, FEC installed

  7. #7
    Join Date
    May 2009
    Location
    Travelers Rest, SC
    Posts
    21
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Now that Google reCAPTCHA V3 is out, is there going to be an upgrade to incorporate? I'm using ZC 157b. Thanks.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by Rick29690 View Post
    Now that Google reCAPTCHA V3 is out, is there going to be an upgrade to incorporate? I'm using ZC 157b. Thanks.
    There's little reason to need v3. Even Google says don't use v3 unless your web app needs it.

    Are you inquiring about v3 "just because it exists"? Or is there something about v3 that you need on your site? What is that?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    110
    Plugin Contributions
    2

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by lat9 View Post
    NOTE: if you're running the unsuffixed version of zc157 without having installed the known patches (https://www.zen-cart.com/showthread....v1-5-7-series) could be part of the problem.

    That initial version had a bug that prevented multiple 'observers' from watching the same event, which might have play in the issue reported.
    Now that 1.5.7b is out, mind you only a few weeks ago, that did solve the issue with the observers. Thank you for pointing out that 1.5.7 had this bug in it. For the last several months I've been banging my head trying to get this to work as I have been flooded with spam emails from the contact us page. I'm not one to jump right on to each update as I have a modified ZC that I winmerge all the files to check for changes before uploading blindly, which is why I didn't upgrade to 157b as soon as it came out. But now that 157b address the observers, the commenting out that I posted earlier is no longer needed. Thank you all for putting up with my rants as I was not the politest in my posts.

  10. #10
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,691
    Plugin Contributions
    11

    Default Re: Support Thread for Google reCAPTCHA plugin

    Whether you jump on the new right away or not, it's a good idea to use the thread tools and subscribe to the thread at https://www.zen-cart.com/showthread....n&goto=newpost

    Do the same for all the new versions and the forum will keep you up to date with changes.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

 

 

Similar Threads

  1. Support Thread for CKEditor Plugin
    By DivaVocals in forum Addon Admin Tools
    Replies: 213
    Last Post: 18 Nov 2024, 04:17 AM
  2. Back to Top Plugin [Support Thread]
    By picaflor-azul in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 6 Feb 2016, 10:52 PM
  3. v151 Plug 'n' Pay plugin [Support Thread]
    By KetchRescue in forum Addon Payment Modules
    Replies: 5
    Last Post: 28 Nov 2015, 04:56 AM
  4. Justuno Plugin [Support Thread]
    By JustunoApp in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 24 May 2015, 11:00 PM
  5. VendingBox Plugin Support Thread
    By vb_support in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 10 Feb 2013, 07:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg