• Resolved daisy4rez

    (@daisy4rez)


    Hi,

    I try to block google recaptcha on my login module and seems it works (captcha checkbox is visible only after consent ). But if I logout and try to login once more time I see message “Captcha is invalid” (in console: error 400 bad request). Despite this I still can login.

    I did deactivate all cache plugins, the same behavior: first login (in private mode) without error, the second try- I get this message. Seems to me like cache issues, or may be something did not update (overwrite) after logout.

    Could you please help me? I would be happy about any help!

    Best regards

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @daisy4rez,

    Can you describe the setup, the plugins, theme used, so we can reproduce?

    regards Aert

    Thread Starter daisy4rez

    (@daisy4rez)

    Hi @aahulsebos,

    thank you for answer!

    I just saw the same behavior by password reset: I get an email with link, change the password and if I try to do this second time in the row (password reset->new email with link ->try to change the password ->error) I get error “Link is expired”.

    I’m using rentalhive theme (login module with recaptcha v.2 )
    HivePress 1.7.1
    Hivepress Geolocation 1.3.7 ( google maps )
    HivePress Blocks 1.0.0
    HivePress Bookings 1.5.0
    HivePress Favorites 1.2.2
    HivePress Messages 1.3.0
    HivePress Paid Listings 1.1.7
    HivePress Reviews 1.3.0
    HivePress Tags 1.0.3

    and few plugins (here are the most important):

    -All In One WP Security
    -Antispam Bee
    -Autoptimize ( only css and js optimizing)
    -of course Complianz | GDPR/CCPA Cookie Consent
    -W3 Total Cache (only caching without minify)
    -WP-Optimize – Clean, Compress, Cache (only db optimizing)
    -Yoast SEO

    I tried to deactivate all of them except complianz and I got still the same error. If I deactivate only complianz, it works fine.

    Best regards

    p.s. I’ve already tried to discuss some problems related to google maps here. The problem is still occur, unfortunately I couldn’t get an answer from Hivepress and I am still using mu-plugin from jarnovos.

    • This reply was modified 11 months, 2 weeks ago by daisy4rez.
    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @daisy4rez,

    Can you try it without the MU Plugin? Rename it to .txt instead of .php to deactivate it.

    Kind regards, Jarno

    Thread Starter daisy4rez

    (@daisy4rez)

    Hi @jarnovos,

    yep, seems the problem was with mu-plugin. Any ideas why mu-plugin leads to the captcha error (besides map’s error)?

    Best regards

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @daisy4rez,

    I used the HivePress initUI() function to trigger the Map after Complianz unblocks it’s scripts, and possibly that’s related to the issue.

    To confirm that, you can remove that section from the MU Plugin, re-enable the MU Plugin and check if the behavior still occurs.

    We would need an alternative to re-initialize the Map after consent is obtained though, but the initUI() function seemed to be the most appropriate. I would recommend asking HivePress, if they have an alternative method that can be used here; or even better, if they can integrate with Complianz on their end.

    That would avoid the need for us to block their scripts & re-trigger the Map on our end, which is seemingly the reason why the issue arises.

    Kind regards, Jarno

    Thread Starter daisy4rez

    (@daisy4rez)

    Hi @jarnovos,

    Hivepress offer to use InitGeolocation function instead of initUI :

    https://github.com/hivepress/hivepress-geolocation/blob/master/assets/js/common.js

    But not sure, what exactly should be on entry as container

    Best regards

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @daisy4rez,

    I’ve implemented the change they suggested, the MU Plugin now uses the initGeolocation function. Seems to work nicely for me (example), so I’m curious to hear about your findings.

    Here’s the updated code: hivepress-revisited.php

    Hope it helps!
    Kind regards, Jarno

    Thread Starter daisy4rez

    (@daisy4rez)

    Hi @jarnovos,

    I am very grateful for your help, thank you.

    I’ve been tested your code as mu-plugin and unfortunately I catched few errors (on the main page, listing page and on the search page) in console:
    1) hivepress.initgeolocation is not a function, here: {hivepress.initGeolocation(jQuery(this));}
    at HTMLDivElement. (?post_type=hp_listing&latitude=&longitude=&_category=&s=&location=:25:10003)
    at Function.each (jquery.min.js?x10115&ver=3.7.1:2:3129)
    at e..each (jquery.min.js?x10115&ver=3.7.1:2:1594)
    at ?post_type=hp_listing&latitude=&longitude=&_category=&s=&location=:25:9977

    2) And “Uncaught ReferenceError: google is not defined” at jquery.geocomplete.min.js:8:2439
    at …/hivepress-geolocation/assets/js/common.min.js?x10115&ver=1.3.7:1
    at …/hivepress/assets/js/common.min.js?x10115&ver=1.7.1:1

    Till now I didn’t see behavior issues related to these errors, but I am still testing.

    Best regards

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @daisy4rez,

    Where can I see those errors appear? I’m browsing through the example site but can’t seem to get that to occur whatever I try.

    Kind regards, Jarno

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Recaptcha is invalid’ is closed to new replies.