• tortitudo

    (@tortitudo)


    Hello,

    I’ve been using this plugin for a while and it worked fine. Recently bots started signing up, so I want to implement captcha.
    But it does not work, because there is a syntax error resulting in “reCAPTCHA couldn’t find user-provided function: onloadSibCallbackInvisible”.
    For some reason, broken <p> tags are appearing in the middle of the javascript, which causes this error. See image here: https://drive.google.com/file/d/16nGDPROm9MAHYiK_fJPmV8vcxTa12duX
    On the left side is the resulting javascript, and on the right side is the php code viewed on my server.

    What could be causing the <p> tags to be appearing in the middle of the javascript? I have disabled every single plugin except this one and it still doesn’t work.

    In the past, I had another problem with this plugin: it was outputting html tags at the very start of the HTML, which made certain tools behave incorrectly, such as Open Graph – it made sharing my website ugly. It sounds like a similar problem – html tags being output in the wrong place.

    This is happening on my staging site, I don’t have a link.
    Thank you for your help.

Viewing 1 replies (of 1 total)
  • Thread Starter tortitudo

    (@tortitudo)

    I found a workaround. It seems the javascript is not being output cleanly for some reason, and wordpress or something else then inserts these <p> tags in the wrong places, which results in syntax errors and broken recaptcha.

    The workaround is to clear the relevant php code of whitespaces, see image: https://drive.google.com/file/d/16tZwMVcmU1w0VBXKmYiVu9r7sFNfVy_2/view?usp=sharing.

    And the proper solution is to output the javascript code in a clean way. I don’t know much about php but I think it should be something with ob_start(); and stuff like that.

    Can you guys please fix it so this won’t break again when I update the plugin?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.