• If I have a Contact form with reCAPTCHA in a Page, then all of a sudden, the reCAPTCHA that usually shows up for the comments disappears.

    The same thing if I have a widget in a sidebar that includes a Contact form with reCAPTCHA. The reCAPTCHA will not show up in the widget until there is no other reCAPTCHA on the page.

    So it looks like there can be only one reCAPTCHA at any time, and the priority seems to be Page/Post containing form > comment > widget containing form.

    This is particularly bad because it creates a loophole for spam to get in on pages/posts with a contact form.

    This is on WordPress 3.0.5 with a multisite setup.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter huyz

    (@huyz)

    In any case, I can’t get the contact form to work with reCAPTCHA. When I hit send, the arrows circle around and nothing else happens.

    Plugin Author Andre Pietsch

    (@pitschi)

    Hi,

    I had no possibility to check that until now. Do you have a test installation of that multisite setup I can get access to? A link to the page would be enough. Would like to step through some javascript code via firebug. No account access or something like that at the moment.

    Or could you provide some screenshots?

    At the moment I have only a 3.1.3 singlesite instance to test. Will have a look if I can setup some older and also multisite versions to test…

    Kind regards

    Andre

    Thread Starter huyz

    (@huyz)

    Sure, Andre.
    You can check this https://test.ofb.net/2011/06/15/contact-form-7-test

    Looking at the source, I can see that there are 3 reCAPTCHA script sections in the page. I just don’t know why only the first one shows up.

    Also, when I click on send in the contact form, I get this in the HTTP POST response:
    “For security reasons, you must pass the remote ip to reCAPTCHA”
    I don’t know what that means.

    Sorry, about all the plugins on the page. I’m testing tons of plugins and how well they work together.

    Thread Starter huyz

    (@huyz)

    It might also be relevant to know that in my setup, my Apache/WordPress are running behind an Apache proxy using ProxyPass.

    But I do have this in my wp-config.php:

    /* As per https://core.trac.www.ads-software.com/ticket/9235 */
    if ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $_SERVER['HTTP_X_FORWARDED_FOR'] ) )
       $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];

    This is an Ajax call however, so I’m not sure if this info matters.

    Plugin Author Andre Pietsch

    (@pitschi)

    ah… thx for the hints… i will have a look. but i won’t be able to fix it until next week. i am on another problem at the moment.

    hope that is ok…

    Thread Starter huyz

    (@huyz)

    Yeah that’s fine. Thanks in advance.

    Thread Starter huyz

    (@huyz)

    Regarding the problem with having multiple reCAPTCHA per page:

    Looking into this further, it looks like a common problem that has to do with the reCAPTCHA API:
    https://groups.google.com/group/recaptcha/browse_thread/thread/1b19592222f8d87b/3cfd98ba4d7f71aa?lnk=gst&q=multiple#3cfd98ba4d7f71aa

    Another test page with Formidable shows the same problem: only one reCAPTCHA shows up:
    https://test.ofb.net/2011/06/16/formidable-test

    Some people were able to fix it:
    https://god-at-the-center.blogspot.com/2009/09/more-than-one-recaptcha-on-page-mixing.html
    https://rubyforge.org/projects/ondemandcaptcha/

    As for the hanging problem when submitting, it does not apply with the Formidable test, though: hitting send works.

    Plugin Author Andre Pietsch

    (@pitschi)

    Thanks for the hints. I also found some possible ways. Have to test them. Will let you know about the progress…

    Have a nice weekend

    Andre

    Plugin Author Andre Pietsch

    (@pitschi)

    Hey…

    released version 0.0.7 that gives some possibilities around options.

    I will address the “one recaptcha issue” now.

    Will keep you informed… ??

    Andre

    Plugin Author Andre Pietsch

    (@pitschi)

    Hey…

    the “one recaptcha” issue is heavier than I thought.

    The solution in the link uses the ajax api whereas the wp-recaptcha thing uses the php api.

    The problem is, that they aren’t really compatible to one another. Both use the same javascript Recaptcha class. At the moment I have no idea how to handle that. They are not designed to work both on the same site.

    There is a chance to “overdeclarate” the Recaptcha class of the javascript. But I have no idea how and if this will work. I can’t guarantee to be the last script to declerate that class. So if there is someone who imports the original after me he will be the on in charge.

    At the moment I have no idea how to solve that. If you have please give me a hint. ??

    Kind regards

    Andre

    Thread Starter huyz

    (@huyz)

    Yeah it didn’t look like an easy problem to fix when I glanced over it.

    I think it’s really up to Google at this point, if someone makes a feature/bug request.

    Plugin Author Andre Pietsch

    (@pitschi)

    It has been reported but I think they won’t do it because they fear some overusage of their service… ??

    I will try some stuff and see if I can fix it…

    Thread Starter huyz

    (@huyz)

    Hmm, this is Google — they should be able to handle it ??

    Maybe one possibility is to only invoke the recaptcha JS once a contact form field has keyboard focus. So the recaptcha would automatically appear. And maybe there’s a way to find any existing on the page and destroy it before creating a new one.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Only allows 1 reCAPTCHA per web page’ is closed to new replies.