Hello all, I am getting a ReCaptchaState undefined and a denied access to property 'toString'.

Timestamp: 10/29/2012 1:45:29 PM
Error: Error: Permission denied to access property 'toString'

Timestamp: 10/29/2012 1:47:13 PM
Error: ReferenceError: RecaptchaState is not defined
Source File: https://www.google.com/recaptcha/api/js/recaptcha.js
Line: 111

Also, when I submit a post without entering the ReCaptcha, the comment and the ReCaptcha box dissappear and no warning is given. If I do enter the ReCaptcha correctly the comment posts correctly, but the ReCaptcha box then disappears, even though I have it set to always ask. Anyone have any ideas? Thanks!

CommentFileSizeAuthor
#9 recaptcha_1826404_ajax.patch762 bytesLiam Morland
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland’s picture

Status: Active » Postponed (maintainer needs more info)

That sounds like a mistake on the Google end. Try it again; they may have fixed it.

Liam Morland’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Presuming fixed. Please reopen if there is still an issue in the Drupal reCAPTCHA module.

digibrill’s picture

Status: Closed (works as designed) » Active

Liam, thanks for the replies. I was trying out another solution, but that may not work, so I am reopening this as requested. What did you mean by on the Google end? Same problem still. I did wonder, this is currently on a development server. Does the site need public access for the module to work correctly?

Thank you.

Liam Morland’s picture

What I mean by the Google end is that there could be a bug in the JavaScript file that Google provides. However, it sounds more likely that it won't work on your development server because the API key you are using is not for that server. You'll need to get a new API key for the dev server.

digibrill’s picture

Will try. Thanks.

Liam Morland’s picture

Category: bug » support
Status: Active » Closed (works as designed)

Presuming fixed. Please re-open if you are still having problems.

accy’s picture

Status: Closed (works as designed) » Needs work

In my case when I was getting the "RecaptchaState is not defined" error it helped changing reCAPTCHA js library from https://www.google.com/recaptcha/api/js/recaptcha.js (which Drupal reCAPTCHA module uses) to http://www.google.com/recaptcha/api/js/recaptcha_ajax.js (I am using reCAPTCHA ajax version)

I hope it will save someone some amount of time I wasted;)

Liam Morland’s picture

Status: Needs work » Active

Thanks for the report.

Status "needs work" is for issues that have a patch that isn't ready to commit.

Liam Morland’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Category: support » bug
Status: Active » Needs review
FileSize
762 bytes

Please try the attached patch against 7.x-1.x-dev. I would appreciate it if both people who are and are not using AJAX would try it. This patch just changes the AJAX library loaded from Google, as suggested in #7.

panche’s picture

I can confirm that #9 works.

Thanks for the patch!

Liam Morland’s picture

Liam Morland’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)

  • Liam Morland committed c9f2ec6 on 7.x-1.x, 7.x-2.x
    Issue #1826404: Use recaptcha_ajax.js instead of recaptcha.js for AJAX.
    

  • Liam Morland committed c9f2ec6 on 8.x-2.x
    Issue #1826404: Use recaptcha_ajax.js instead of recaptcha.js for AJAX.
    

  • Liam Morland committed c9f2ec6 on 6.x-2.x
    Issue #1826404: Use recaptcha_ajax.js instead of recaptcha.js for AJAX.
    
hass’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Patch (to be ported) » Fixed

This bug does not exists in D6.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.