Results 1 to 10 of 694

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    59
    Plugin Contributions
    1

    Default Re: Support Thread for Google reCAPTCHA plugin

    [ZC 1.5.8]
    My google reCaptcha works but
    Somewhere along the path of upgrading I have ended up with both
    Code:
    includes/clases/observers/auto.non_captcha_observer.php
    and
    Code:
    includes/auto_loaders/config.google_recaptcha.php
    includes/clases/observers/class.google_recaptcha.php
    Aren't these contradictory load types?
    I mean either one or the other.
    Should the other one be removed?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Support Thread for Google reCAPTCHA plugin

    They are contradictory load types. I'm guessing that the auto-loaded observer is more recent; if so, the auto_loader and its observer-class should be removed. If my guess isn't correct, remove (or simply rename) the auto-loaded one.

  3. #3
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    59
    Plugin Contributions
    1

    Default Re: Support Thread for Google reCAPTCHA plugin

    Sorry my fault!
    non_captcha_observer is totally something else, i.e. not a a part of google_recaptcha.
    It comes with a standard ZC distribution.

    Quote Originally Posted by zamzom View Post
    [ZC 1.5.8]
    My google reCaptcha works but
    Somewhere along the path of upgrading I have ended up with both
    Code:
    includes/clases/observers/auto.non_captcha_observer.php
    and
    Code:
    includes/auto_loaders/config.google_recaptcha.php
    includes/clases/observers/class.google_recaptcha.php
    Aren't these contradictory load types?
    I mean either one or the other.
    Should the other one be removed?

  4. #4
    Join Date
    Jun 2014
    Posts
    157
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    zc158a
    PHP v8.2
    ZCA Bootstrap v3.6.5
    Google reCaptcha (v3.6)
    I've got several errors/warnings like this:
    Code:
    [18-Jun-2024 02:39:30 UTC] Request URI: /index.php?main_page=contact_us&action=send, IP address: 117.192.113.1, Language id 2
    #0 /includes/classes/observers/class.google_recaptcha.php(40): zen_debug_error_handler()
    #1 /includes/classes/traits/NotifierManager.php(87): google_recaptcha->update()
    #2 /includes/modules/pages/contact_us/header_php.php(31): base->notify()
    #3 /index.php(35): require('...')
    --> PHP Warning: Undefined array key "g-recaptcha-response" in /includes/classes/observers/class.google_recaptcha.php on line 40.
    Mainly at contact_us.
    Any suggestions on how to solve this?

    TIA,

    jpda

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: Support Thread for Google reCAPTCHA plugin

    This code just needs to be updated for PHP8. Change

    includes/classes/observers/class.google_recaptcha.php on line 40

    to check

    isset($_POST['g-recaptcha-response'])
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Jun 2014
    Posts
    157
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by swguy View Post
    This code just needs to be updated for PHP8. Change

    includes/classes/observers/class.google_recaptcha.php on line 40

    to check

    isset($_POST['g-recaptcha-response'])
    Thanks for your quick response! I'll change the code.

    jpda

  7. #7
    Join Date
    Jun 2014
    Posts
    157
    Plugin Contributions
    0

    Default Re: Support Thread for Google reCAPTCHA plugin

    Quote Originally Posted by jpda View Post
    Thanks for your quick response! I'll change the code.

    jpda
    Sorry, how should line 40 look after the correction?
    Now it is:
    HTML Code:
    $resp = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
    TIA,

    jpda

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: Support Thread for Google reCAPTCHA plugin

    $resp = $recaptcha->verify($_POST['g-recaptcha-response'] ?? '', $_SERVER['REMOTE_ADDR']);
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

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