Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • carolinefrontender

    (@carolinefrontender)

    Deepak, you can try switching to reCaptcha v2 if you would like, but that unfortunately did not work for us.

    Instead, we ended up changing Captcha 4WP’s settings under “Failed login Captcha – Show login Captcha after how many failed attempts? 0 = show always,” changing the number from 0 to 4. This way, the user has up to 3 attempts to login incorrectly (maybe with a wrong password), and a 4th attempt to still login correctly. But after that 4th attempt, login Captcha will show that same error, “Error: Please solve captcha correctly” and prevent any further attempts from logging in.

    This does NOT solve the problem, but it is a temporary solution to allow regular users to still login within a certain number of attempts, stopping any spam past those number of attempts… all while we work on re-creating the login page ourselves and/or wait from a response from AAM.

    I am also having issues with an AAM login page (which uses the AAM login shortcode) and Google reCaptcha.

    The reCaptcha plugin we are using is Captcha 4WP (https://wordpress.org/plugins/advanced-nocaptcha-recaptcha/). When the plugin is deactivated, the AAM login works, but we obviously then have no reCaptcha on the site. When the plugin is activated and adds reCaptcha on the site, then the AAM login fails with the error “Error: Please solve captcha correctly.” I checked AAM’s documentation and could not find anything about reCaptcha compatibility.

    We are going to try to switch from reCaptcha v3 to v2 with the “I’m not a robot” checkbox. However if this doesn’t work, we’re going to need to recreate our login page without using AAM, unless AAM comes out with a fix in their next update or a solution is provided in this support ticket.

    Thank you @jasontremblay!

    I did find another solution on this support page:

    https://wordpress.org/support/topic/svg-support-advanced-settings-trigger-wp-error-under-latest-wp-ver-php-8/

    If you scroll to the bottom, @huntprod gives a solution that worked for me. His work is linked at https://gist.github.com/jhunt/61261891aed0c46d065604c6c67e3b10. It involves editing three files (svg-support/functions/enqueue.php, svg-support/js/svgs-inline.js, and svg-support/js/min/svgs-inline-min.js).

    Your solution @jasontremblay is probably cleaner/simpler, so thank you for providing it!

    I’ve had the exact same problem @lowegreg. I went into /plugins/svg-support/functions/enqueue.php and replaced those two lines with these lines, including a comment:

    /* fix for wp_localize_script (third parameter) not being called with an array
     * ref: https://stackoverflow.com/questions/66611705/getting-notice-is-wordpress-wp-scriptslocalize-was-called-incorrectly
     * 
     * original code:
     * wp_localize_script( 'bodhi_svg_inline', 'cssTarget', $css_target_array );
     * wp_localize_script( 'bodhi_svg_inline', 'ForceInlineSVGActive', $force_inline_svg_active );
     */
    wp_localize_script( 'bodhi_svg_inline', 'cssTarget', array($css_target_array) );
    wp_localize_script( 'bodhi_svg_inline', 'ForceInlineSVGActive', array($force_inline_svg_active) );

    While this fixes the fatal error I was getting on my website, I still get an error in my browser console that I haven’t been able to resolve:

    Firefox:

    Uncaught TypeError: i is undefined
        bodhisvgsInlineSupport [site-domain]/wp-content/plugins/svg-support/js/min/svgs-inline-min.js?ver=1.0.0:1

    Chrome:

    Uncaught TypeError: Cannot read property 'endsWith' of undefined
        at String.<anonymous> (svgs-inline-min.js?ver=1.0.0:1)

    Please help, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)