Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I like the module, works for me and I am using it with webform, too. Have a doubt though... when I pick a theme, no matter which one I pick, I don't see any change on the captcha style. Tried to use phptemplate_recaptcha_custom_widget() in my template.php without any success.
Am I doing something wrong, did I miss something?
Thanks for your help!
Comments
Comment #1
Bimbastico CreditAttribution: Bimbastico commentedComment #2
cj-a-min CreditAttribution: cj-a-min commentedSame here, the theme doesn't change; flushed and truncated all caches. Maybe the theme can be changed through http://www.google.com/recaptcha/admin/ . I am afraid to go to that url, because sometimes gmail emails gets associated with other gmail emails. Happened to me already. Not to get off the subject, but my wife was using the same computer, and used another google feature, and now the emails are associated, which means she can access all the web dev stuff. Not that I am worried (I trust her); but it's still security risk.
Anyways, hopefully this theming issue gets resolved.
Comment #3
Aaron Stanush CreditAttribution: Aaron Stanush commentedConfirmed that this issue persists in 6.x-1.7 as well. Marking as a bug.
To clarify, no matter which theme you choose, it always displays the "Red" style.
Comment #4
luketsimmonsHi guys,
I too had this issue, but realised the code and implementation of the theme change is correct. It's more than likely you all have your $scripts outputting at the end of your page template and therefore the recaptcha form is initialising but without the theme change option, therefore the default is red.
I've moved my $scripts back to the head to test and it now shows as the new theme, i.e. white.
Not sure why it works like that without really looking into it, because the header JS creates the recaptcha HTML so it should require that before it displays anyway...
Have a go and if it's still failing then it could be rogue JS that is erroring and stopping the recpatcha theme request from working.
thanks,
luke
Comment #5
luketsimmonsHi all,
I've actually come across this again on a different site, where I didn't want to just "fix" by repositioning $scripts.
So I had a further look and if you set ReCaptcha to use the Ajax API the theme will work as expected from the settings, if you have $scripts in your site footer (or just past where the form is displayed).
The logic for the AJAX API call loads the ReCaptcha JS from google and then creates the form inline, so the theme option (and locale) have been set, meaning the form displays correctly.
Have a go, I guess this is just an optional workaround for anyone wanting to maintain the performance boost you can get from having JS load in the footer as opposed to the head.
Thanks,
luke
Comment #6
hass CreditAttribution: hass commentedI guess this is fixed in latest DEV. reopen if not.