It seems the theming is not working.

reCAPTCHA module outputs

<!--//--><![CDATA[//><!--
var RecaptchaOptions = { "theme": "white", "lang": "en" };
//--><!]]>

When it should be

<!--//--><![CDATA[//><!--
var RecaptchaOptions = { theme : 'white', lang : 'en' };
//--><!]]>

Note the apostrophes.

Comments

amclin’s picture

This is because drupal's built in drupal_to_js() function escapes all the variable names in an array. Doesn't seem to be a way to fix this except for bypassing the drupal_to_js() call in recaptcha.module in favor of a module-specific output.

Oh, and in addition, this needs to be inserted BEFORE the call to the recaptcha js in order for it to work.

schnitzel’s picture

Version: 6.x-1.4 » 5.x-2.6
Status: Active » Needs work
StatusFileSize
new1.08 KB

I had the same problem in the 5.x-2.6 version and created this patch.

It's a bit hacky, but it works and maybe someone, would create a patch which adds this functionality in the recaptcha_get_html() function.

schnitzel’s picture

StatusFileSize
new1.06 KB

Oh, patch was wrong, sorry.

here it is the correct version:

liam morland’s picture

Status: Needs work » Closed (won't fix)

Versions prior to Drupal 6 are no longer supported. If this issue still exists in a supported version, please re-open and provide details.