• The function “save_comment_script” needs to be modified in the recaptcha.php page to check for the existence of the id ‘submit’. Otherwise, the getElementById(‘submit’) returns null and the function throws a JavaScript error on the page. I’m using IE8, WordPress 3.1.2, wp-recaptcha version 3.1.3.

    Works fine on my comment page where this button exists, but throws the error on any page that does not show the comment form with reCaptcha (and that does not include a ‘submit’ id). Wrapping this code around the lines in the function works for me:

    if(document.getElementById(‘submit’) != null)

    It was easy enough to manually fix in the plugin code, but it would be great if that check could be added to the main plugin source so that I don’t have to keep remembering to add it in every time I upgrade the plugin.

    Thanks!

Viewing 5 replies - 16 through 20 (of 20 total)
  • lcool,

    3.1.4 just came out… it still has this issue. I don’t know how that’s possible. I updated to 3.1.4 & re-instated this patch.

    Really? Haven’t updated yet. well, hopefully the developer reads this.

    Jake Sully

    (@localbizregistry)

    Until now the issue persists.

    ‘document.getElementById(…)’ is null or not an object

    I hope this plugin isn’t abandoned. Thanks for sharing the fix, you guys saved me a lot of debugging time. ??

    No updates since April 2011.

    No replies from author on these forums in months.

    Might well be abandoned.

    Jake Sully

    (@localbizregistry)

    Has anyone updated the plugin and saw that the error is fixed? I’m cautious updating the plugin, it might undo the patch.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘[Plugin: WP-reCAPTCHA] JavaScript error on pages that don't have submit button’ is closed to new replies.