#206 | recaptcha-ajax-2493183-164+nocaptcha-2852269-206.patch | 18.7 KB | hswong3i |
|
#203 | recaptcha-ajax-2493183-164+nocaptcha-2852269-203.patch | 19.59 KB | cgmonroe |
|
#200 | recaptcha-ajax-2493183-164+nocaptcha-2852269-200.patch | 14.09 KB | cgmonroe |
|
#199 | interdiff-2852269-165-199.txt | 581 bytes | ksenzee |
#199 | recaptcha-ajax-2493183-164+nocaptcha-2852269-199.patch | 21.22 KB | ksenzee |
|
#199 | recaptcha-nocaptcha-2852269-199.patch | 20.3 KB | ksenzee |
|
#196 | recaptcha-2852269-196.patch | 13.72 KB | gugalamaciek |
|
#191 | Screen Shot 2020-04-07 at 12.04.35 PM.png | 714.46 KB | veronicaSeveryn |
#191 | Screen Shot 2020-04-07 at 12.03.30 PM.png | 727.76 KB | veronicaSeveryn |
#187 | recaptcha-2852269-185-7.x-187.patch | 13.7 KB | goron |
|
#185 | interdiff-2852269-174-185.txt | 803 bytes | aprice42 |
#185 | recaptcha-2852269-185-7.x_0.patch | 13.73 KB | aprice42 |
|
#180 | recaptcha-nocaptcha-2852269-180.patch | 20.26 KB | hswong3i |
|
#180 | recaptcha-ajax-2493183-160+nocaptcha-2852269-180.patch | 16.87 KB | hswong3i |
|
#175 | recaptcha-2852269-174-7.x.patch | 13.66 KB | veret |
|
#174 | recaptcha-2852269-174-7.x.patch | 10.29 KB | veret |
|
#172 | recaptcha-ajax-2493183-164+nocaptcha-2852269-165_2.patch | 21.19 KB | timcosgrove |
|
#171 | recaptcha-ajax-2493183-164+nocaptcha-2852269-165.patch | 21.64 KB | timcosgrove |
|
#169 | recaptcha-invisible-2852269-169-7.x.patch | 8.61 KB | bjaxelsen |
|
#165 | interdiff-2852269-151-165.txt | 749 bytes | hswong3i |
#165 | recaptcha-nocaptcha-2852269-165.patch | 20.27 KB | hswong3i |
|
#165 | recaptcha-ajax-2493183-160+nocaptcha-2852269-165.patch | 16.88 KB | hswong3i |
|
#164 | recaptcha-nocaptcha-2852269-164-reroll.patch | 19.77 KB | mr.york |
|
#163 | recaptcha-nocaptcha-2852269-163-reroll.patch | 0 bytes | mr.york |
|
#162 | interdiff-2852269-160-161.txt | 493 bytes | mr.york |
#162 | recaptcha-2852269-161-invisible-recaptcha-and-ajax-D7.patch | 12.21 KB | mr.york |
|
#160 | recaptcha-2852269-160-invisible-recaptcha-and-ajax-D7-reroll.patch | 12.02 KB | mr.york |
|
#157 | recaptcha-2852269-157-invisible-recaptcha-and-ajax-D7.patch | 12.02 KB | TimRutherford |
|
#157 | interdiff-2852269-124-157.txt | 4.74 KB | TimRutherford |
#151 | recaptcha-nocaptcha-2852269-151.patch | 19.82 KB | Chizh273 |
|
#151 | recaptcha-ajax-2493183-156+nocaptcha-2852269-151.patch | 16.92 KB | Chizh273 |
|
#151 | interdiff-2852269-149-151.txt | 773 bytes | Chizh273 |
#149 | recaptcha-nocaptcha-2852269-149.patch | 19.68 KB | hswong3i |
|
#149 | recaptcha-ajax-2493183-156+nocaptcha-2852269-149.patch | 16.79 KB | hswong3i |
|
#149 | diff-148-149.txt | 1.71 KB | hswong3i |
#148 | recaptcha-ajax-2493183-136+nocaptcha-2852269-148.patch | 16.79 KB | hswong3i |
|
#148 | recaptcha-nocaptcha-2852269-148.patch | 19.69 KB | hswong3i |
|
#148 | interdiff-141-148.txt | 2.88 KB | hswong3i |
#144 | interdiff-141-144.txt | 684 bytes | james.williams |
#144 | recaptcha-nocaptcha-2852269-144.patch | 19.87 KB | james.williams |
|
#141 | recaptcha-nocaptcha-2852269-141.patch | 19.75 KB | hswong3i |
|
#141 | recaptcha-ajax-2493183-136+nocaptcha-2852269-141.patch | 17.96 KB | hswong3i |
|
#141 | interdiff-140-141.txt | 763 bytes | hswong3i |
#140 | interdiff-139-140.txt | 666 bytes | hswong3i |
#138 | interdiff-136-139.txt | 579 bytes | hswong3i |
#140 | recaptcha-nocaptcha-2852269-140.patch | 19.9 KB | hswong3i |
|
#140 | recaptcha-ajax-2493183-136+nocaptcha-2852269-140.patch | 16.85 KB | hswong3i |
|
#138 | recaptcha-ajax-2493183-128+nocaptcha-2852269-139.patch | 16.89 KB | hswong3i |
|
#138 | recaptcha-nocaptcha-2852269-139.patch | 20.1 KB | hswong3i |
|
#136 | recaptcha-nocaptcha-2852269-136.patch | 19.86 KB | hswong3i |
|
#136 | recaptcha-ajax-2493183-127+nocaptcha-2852269-136.patch | 16.65 KB | hswong3i |
|
#126 | recaptcha-ajax-2493183-115+nocaptcha-2852269-126.patch | 16.16 KB | hswong3i |
|
#124 | recaptcha-2852269-124-invisible-recaptcha-and-ajax-D7.patch | 12.76 KB | sokru |
|
#123 | 2852269-123-invisible-recaptcha-and-ajax-D7.patch | 10.18 KB | sokru |
|
#122 | recaptcha-ajax-2493183-114+nocaptcha-2852269-122.patch | 15.82 KB | hswong3i |
|
#121 | recaptcha-2852269-121-compaibility-with-2493183-111.patch | 15.76 KB | james.williams |
|
#120 | recaptcha-2852269-120-invisible.patch | 15.49 KB | james.williams |
|
#120 | interdiff-2852269-97-120.txt | 2.94 KB | james.williams |
#117 | recaptcha-8.x-2.x-invisible-option-2852269-97-compatibility-with-2493183-110.patch | 15.11 KB | jofitz |
|
#113 | recaptcha-8.x-2.x-invisible-option-2852269-97-compatibility-with-2493183.patch | 15.05 KB | GaëlG |
|
#108 | 2852269-108-invisible-recaptcha-and-ajax-D7--interdiff-vs-61.patch | 9.05 KB | jedihe |
|
#108 | 2852269-108-invisible-recaptcha-and-ajax-D7.patch | 14.02 KB | jedihe |
|
#106 | 2852269-106-invisible-recaptcha-and-ajax-D7--interdiff-vs-61.patch | 9.03 KB | jedihe |
|
#106 | 2852269-106-invisible-recaptcha-and-ajax-D7.patch | 13.99 KB | jedihe |
|
#101 | 2852269-101-invisible-recaptcha-and-ajax-D7--interdiff-vs-61.patch | 9.03 KB | jedihe |
|
#101 | 2852269-101-invisible-recaptcha-and-ajax-D7.patch | 13.99 KB | jedihe |
|
#97 | interdiff-93-97.txt | 1.2 KB | gg4 |
#97 | recaptcha-8.x-2.x-invisible-option-2852269-97.patch | 14.64 KB | gg4 |
|
#96 | interdiff-93-95.txt | 1.2 KB | gg4 |
#93 | recaptcha-8.x-2.x-invisible-option-2852269-93.patch | 13.92 KB | hswong3i |
|
#89 | protected-by-recaptcha.png | 111.51 KB | esod |
#87 | recaptcha-no-contact.png | 137.07 KB | esod |
#85 | no-recaptcha.png | 134.51 KB | esod |
#85 | invisible.png | 109.27 KB | esod |
#61 | 2852269-61-invisible-recaptcha-D7--interdiff-vs-58.patch | 5.83 KB | jedihe |
|
#61 | 2852269-61-invisible-recaptcha-D7--interdiff-vs-57.patch | 7.87 KB | jedihe |
|
#61 | 2852269-61-invisible-recaptcha-D7.patch | 13.09 KB | jedihe |
|
#60 | 2852269-60-invisible-recaptcha-D7--interdiff-vs-58.patch | 5.7 KB | jedihe |
|
#60 | 2852269-60-invisible-recaptcha-D7--interdiff-vs-57.patch | 7.73 KB | jedihe |
|
#60 | 2852269-60-invisible-recaptcha-D7.patch | 12.96 KB | jedihe |
|
#59 | 2852269-59-invisible-recaptcha-D7--interdiff-vs-58.patch | 5.66 KB | jedihe |
|
#59 | 2852269-59-invisible-recaptcha-D7--interdiff-vs-57.patch | 7.69 KB | jedihe |
|
#59 | 2852269-59-invisible-recaptcha-D7.patch | 12.92 KB | jedihe |
|
#58 | 2852269-58-invisible-recaptcha-interdiff-vs-57.patch | 2.29 KB | jedihe |
|
#58 | 2852269-58-invisible-recaptcha-D7.patch | 9.63 KB | jedihe |
|
#57 | 2852269-57-invisible-recaptcha.patch | 7.33 KB | jedihe |
|
#56 | recaptcha-invisible-option-2852269-56.patch | 13.98 KB | id.aleks |
|
#54 | recaptcha-invisible-option-2852269-52.patch | 6.66 KB | id.aleks |
|
#52 | Google reCaptcha module problem.PNG | 12.53 KB | Superbank |
#48 | recaptcha-invisible-without-2852269-48-7.x-2.x-dev.patch | 13.4 KB | ShawnRong |
|
#42 | recaptcha-invisible-without-ajax-form-submit-2852269-42-7.x-2.x.patch | 11.9 KB | ShawnRong |
|
#39 | recaptcha-invisible-without-ajax-form-submit.patch | 8.7 KB | mozh92 |
|
#36 | invisible_option-2852269-36.patch | 5.62 KB | Matroskeen |
- 8.x-2.x:
- PHP 5.5 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 5.5 & PostgreSQL 9.1, D8.4 3 pass, 1 fail
- PHP 5.5 & SQLite 3.8, D8.4 3 pass, 1 fail
- PHP 5.6 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 7 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 7 & PostgreSQL 9.1, D8.4 3 pass, 1 fail
- PHP 7 & SQLite 3.14, D8.4 3 pass, 1 fail
|
#36 | interdiff-2852269-24-2852269-36.txt | 1.69 KB | Matroskeen |
#33 | interdiff-2852269-24-2852269-33.txt | 526 bytes | Matroskeen |
#33 | invisible_option-2852269-33.patch | 5.53 KB | Matroskeen |
- 8.x-2.x:
- PHP 5.5 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 5.5 & PostgreSQL 9.1, D8.4 3 pass, 1 fail
- PHP 5.5 & SQLite 3.8, D8.4 3 pass, 1 fail
- PHP 5.6 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 7 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 7 & PostgreSQL 9.1, D8.4 3 pass, 1 fail
- PHP 7 & SQLite 3.14, D8.4 3 pass, 1 fail
|
#24 | invisible_option_8_x_2_x_dev-2852269-15.patch | 5.55 KB | hass |
- 8.x-2.x:
- PHP 5.5 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 5.5 & PostgreSQL 9.1, D8.4 3 pass, 1 fail
- PHP 5.5 & SQLite 3.8, D8.4 3 pass, 1 fail
- PHP 5.6 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 7 & MySQL 5.5, D8.4 3 pass, 1 fail
- PHP 7 & PostgreSQL 9.1, D8.4 3 pass, 1 fail
- PHP 7 & SQLite 3.14, D8.4 3 pass, 1 fail
|
#3 | invisible_recaptcha.patch | 3.51 KB | Anonymous (not verified) |
|
#6 | recaptcha_implement_invisible_recaptcha.patch | 5.4 KB | bobdekinder |
|
#8 | invisible_option-2852269-8.patch | 3.64 KB | chgasparoto |
|
#14 | invisible_option_8_x_2_x_dev-2852269-14.patch | 5.56 KB | chgasparoto |
|
#15 | invisible_option_8_x_2_x_dev-2852269-15.patch | 5.55 KB | chgasparoto |
|
#15 | interdiff-2852269-14-15.txt | 798 bytes | chgasparoto |
#17 | recaptcha-7.x-2.2.patch | 3.79 KB | Bedstvie |
|
Comments
Comment #2
hass CreditAttribution: hass commentedlooking for your patch...
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedHere is a quick patch for testing which adds an 'invisible' option to the size setting.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI've added a patch which adds a new 'invisible' size to the configuration. Make sure you also disable the display of the CAPTCHA description.
Comment #5
hass CreditAttribution: hass commentedComment #6
bobdekinder CreditAttribution: bobdekinder commentedHi, i tested out the patch provided by VacuumWizaard. But I think a part about the actual form submission is missing. I therefore wrote my own patch based on his. Would love some feedback ...
Comment #7
inovegil CreditAttribution: inovegil commentedI'm trying to patch with first the second, then the first file, the module on a working D7 site and I cannot achieve that. Perhaps I should apply it over d8 or directly on the repo? Anyway if it isn't too difficult would be interesting to officially add support for this. Thanks in advance by your help.
Comment #8
chgasparoto CreditAttribution: chgasparoto as a volunteer and at CI&T commentedI made this patch based on @bobdekinder code, with some little improvements.
This is for version 7.x-2.0, once the issue for it was closed earlier (https://www.drupal.org/node/2859577).
Please review.
Thanks!
Comment #9
hass CreditAttribution: hass commentedD8 first, than backports. We always write patches against DEV.
Hiding bad patches.
Comment #10
inovegil CreditAttribution: inovegil commented@chgasparoto #8 I don't achieve to get this running. I've applied the patch but the options don't appear as modified in recaptcha.admin.inc. I've already reinstalled the module. Ideas? Thanks. Thanks @hass #9.
Comment #11
chgasparoto CreditAttribution: chgasparoto as a volunteer and at CI&T commented@hass alright, thanks!
@inovegil did you look up on size option? I got this running on a simplytest.me instance without any problems.
Comment #12
inovegil CreditAttribution: inovegil commentedYes I did. The options are normal and compact. I'll try completely erasing and reinstalling. Thanks.
Comment #13
inovegil CreditAttribution: inovegil commentedI tried that in simplytest.me it works fine, It's strange because uninstalling and erasing the module (captcha and recaptcha) and then reinstalling them the option is not appearing. One posible reason is that my site is in spanish but I added english, changed the language of the page and the box size was the same options. It's really strange. I tried applying the patch both with patch and git apply without errors. Thanks.
Comment #14
chgasparoto CreditAttribution: chgasparoto as a volunteer and at CI&T commented@inovegil That's weird. Later I'll try with another language and I'll let you know.
I wrote a patch for the dev version.
Please review.
Thanks!
Comment #15
chgasparoto CreditAttribution: chgasparoto as a volunteer and at CI&T commentedRe-uploading the patch.
I made a mistake forgetting right blank spaces on Badge options array.
Comment #16
chgasparoto CreditAttribution: chgasparoto as a volunteer and at CI&T commented@inovegil I tested with a Portuguese site and worked fine too. Did you get any errors?
Comment #17
Bedstvie CreditAttribution: Bedstvie commentedintegrated your patch to Drupal 7
Comment #18
hass CreditAttribution: hass commentedWhy is testbot not running on the patches? :-(
Comment #19
hass CreditAttribution: hass commentedD7 uninstall code is missing.
Comment #20
inovegil CreditAttribution: inovegil commentedHello. It seems that there isn't any error. It's very strange, because on all my tests outside this site it worked properly. Regards.
Comment #21
inovegil CreditAttribution: inovegil commentedHide the chgasparoto patch with errors (8.x). He said that they reuploaded the patch dued to mistakes.
Comment #22
levmyshkinI tried #17 patch, but it doesn't work for me. It shows always:
The answer you entered for the CAPTCHA was not correct.
I'm not sure why it happens. Firstly I think invisible reCaptcha works only with https, I tested it on local instance without https:
https://developers.google.com/recaptcha/docs/invisible
Secondary I'm not how it should work. Follow docs save/submit button must have attributes:
class="g-recaptcha" data-sitekey="your_site_key" data-callback='onSubmit'
But now I see another button has the same attributes, not save/submit button.
Comment #23
mchaplin CreditAttribution: mchaplin commentedWill the Invisible reCAPTCHA option be incorporated into a D7 version of this module?
Is there a time frame for that?
Thanks Mike
Comment #24
hass CreditAttribution: hass commentedReattach for testing
Comment #26
hass CreditAttribution: hass commentedFailing patches cannot committed.
Comment #27
hass CreditAttribution: hass commentedWe should add a note that people should uncheck Add a description to the CAPTCHA in CAPTCHA settings or an empty fieldset with just a bit confusing text is shown.
Comment #28
hass CreditAttribution: hass commentedComment #29
hass CreditAttribution: hass commentedComment #30
hass CreditAttribution: hass commentedComment #31
thedotwriter CreditAttribution: thedotwriter commented#17 works fine for a simple form.
But it does not work when two forms use invisible reCAPTCHA on the same page.
To be able to make it work, I had to do a few things:
1. Apply the following patch to enable reCAPTCHA to be set on two forms in the same page: https://www.drupal.org/node/1833822#comment-11430341
2. Modify the code of the patch like I suggested here: https://www.drupal.org/node/1833822#comment-12034233
3. Modify line 54 of recaptcha.invisible.js :
grecaptcha.execute();
by:
grecaptcha.execute(Drupal.behaviors.recaptcha.widgets[$('.g-recaptcha[data-size="invisible"]', $form).attr('id')]);
That way, you'll make sure reCATPCHA executes the right widget and not the first to have been defined when loading the page (without the widget ID as argument,
grecaptcha.execute()
automatically fallback to the first defined CAPTCHA).Sorry, I did not do a patch, I'm not sure how that works and I'm lacking time. I still wanted to throw the solution out there though, it may help a few folks.
Cheers
Comment #32
loze CreditAttribution: loze commentedI tried the patch in #17 as well as the changes suggested in #31The captcha badge shows up on the form, but on submit I get "The answer you entered for the CAPTCHA was not correct"
I'm getting this in the logs:"post blocked by CAPTCHA module: challenge reCAPTCHA (by module recaptcha), user answered "Google no captcha", but the solution was "1""
My fault, I had applied the patch incorrectly.
#17 Appears to be working in my case.
Comment #33
MatroskeenMade a little fix for 8.x-2.x version.
Patch and interdiff attached.
Comment #34
MatroskeenComment #36
MatroskeenHm... seems that previous patches will not work on forms with multiple submits, for example with multiple field and "Add more" button.
Tried to fix this issue with new patch. Interdiff attached.
Comment #37
MatroskeenComment #39
mozh92 CreditAttribution: mozh92 commented#31 I put everything in one file, this work, Thanks!
But, I have problem with ajax webforms, maybe who can help me
Comment #40
hass CreditAttribution: hass commentedComment #42
ShawnRong CreditAttribution: ShawnRong at CI&T for Johnson & Johnson commentedI had integrated the new Google Invisible reCAPTCHA options for Drupal 7.And it supports multiple forms in one page.In the recaptcha-customize.js file, Users can rewrite two functions before or after Google reCAPTCHA widget rendered.Here's my patch:
Comment #43
ShawnRong CreditAttribution: ShawnRong at CI&T for Johnson & Johnson commentedI had integrated the new Google Invisible reCAPTCHA options for Drupal 7.And it supports multiple forms in one page.In the recaptcha-customize.js file, Users can rewrite two functions before or after Google reCAPTCHA widget rendered.Here's my patch:
Comment #44
ShawnRong CreditAttribution: ShawnRong at CI&T for Johnson & Johnson commentedI had integrated the new Google Invisible reCAPTCHA options for Drupal 7.And it supports multiple forms in one page.In the recaptcha-customize.js file, Users can rewrite two functions before or after Google reCAPTCHA widget rendered.Here's my patch:
Comment #45
ShawnRong CreditAttribution: ShawnRong at CI&T for Johnson & Johnson commentedI had integrated the new Google Invisible reCAPTCHA options for Drupal 7.And it supports multiple forms in one page.In the recaptcha-customize.js file, Users can rewrite two functions before or after Google reCAPTCHA widget rendered.(ps.Please ignore my last three comments,I was really confused with the drupal org issue rules.)Here's my patch:
Comment #47
hass CreditAttribution: hass commentedComment #48
ShawnRong CreditAttribution: ShawnRong at CI&T for Johnson & Johnson commentedComment #49
ShawnRong CreditAttribution: ShawnRong at CI&T for Johnson & Johnson commented@hass
I had updated the new Google Invisible reCAPTCHA options into the 7.x version.Can you merge the patch into the development release?
Comment #51
hass CreditAttribution: hass commentedComment #52
Superbank CreditAttribution: Superbank as a volunteer commentedI am new to Drupal.
I just wanted to launch my own blog and installed Drupal 7.54.
Everything was fine until I installed the Google reCaptcha module from here: https://www.drupal.org/project/google_recaptcha
I have configured reCaptcha correctly, entered my web site secret and public keys.
However now I lost my admin access to Drupal because there is probably a bug in this reCaptcha module from here: https://www.drupal.org/project/google_recaptcha
After I pass the Captcha chalenge and enter correctly my Admin name and password I always get this error:
If you cannot see the image please click HERE
As I'm not able to log in as Administrator now I cannot disable the Drupal reCaptcha module.
As a result my Drupal web site is dead now.
I need an urgent advice on how to fix this annoying issue.
Comment #54
id.aleks CreditAttribution: id.aleks at Drudesk for PMMI Media Group commentedI have refined a patch of Matroskeen (Thanks for your work =) ) for D8, that was added here #36. Tested it with Form API Examples, seems it works both on ajax and non-ajax form. Please, test it again.
Comment #55
hass CreditAttribution: hass commentedThere is a typo in recapthcaOnInvisibleSubmit. I guess that the noscript code no longer works and may need to be removed. Not tested.
Comment #56
id.aleks CreditAttribution: id.aleks at Drudesk for PMMI Media Group commentedHass, I have updated patch according to you comment. Seems, that reCaptcha doesn't work at all with disabled javascript option. So I removed completely that feature from module. Actually, I think that we need some features if javascript is disabled, but not sure if it's related to this issue. Moreover, I have updated recaptcha.invisible.js code, due to some issues in it. Please test it.
Comment #57
jedihe CreditAttribution: jedihe as a volunteer commented#39 didn't apply cleanly, re-rolling to fix that problem. Re-roll was verified with a visual diff tool: no code changes, only diff metadata and file paths were updated.
Switching to D7 to run tests.
Comment #58
jedihe CreditAttribution: jedihe as a volunteer commentedTrying to fix the tests by taking code from https://www.drupal.org/node/1833822#comment-12136661
Comment #59
jedihe CreditAttribution: jedihe as a volunteer commentedTests are passing now; let's now fix coding standards compliance.
Comment #60
jedihe CreditAttribution: jedihe as a volunteer commentedI don't know how to use 'use' ;)
Comment #61
jedihe CreditAttribution: jedihe as a volunteer commentedCoding standards not yet fixed..
Comment #62
jedihe CreditAttribution: jedihe as a volunteer commentedJust 1 warning about coding standards, will leave it like that. Manual testing is still to be done.
Switching to 8.x while I perform manual testing and perform some other adjustments (we may need to call .reset() as done in #2493183: Ajax support / Use behaviors).
Comment #63
jedihe CreditAttribution: jedihe as a volunteer commentedHiding interdiffs.
Comment #64
hass CreditAttribution: hass commentedHave you ever seen the test with select box next to file upload button?
Comment #65
hass CreditAttribution: hass commentedComment #66
mozh92 CreditAttribution: mozh92 commentedthis in not work with ajax, I try patch https://www.drupal.org/files/issues/2493183-71-ajax-support.patch with #61
Comment #67
jedihe CreditAttribution: jedihe as a volunteer commented@hass: hey! I've seen it :), it only offers a single test setup, but I need more comprehensive testing than that. Any other way you know to get multiple test envs without (temporarily) switching the issue to 7.x?
Some results from manual testing for #61 (D7, using Examples module):
reCaptcha V2:
Invisible reCaptcha:
In summary:
Given how difficult it seems to be to get the invisible reCaptcha working with AJAX-enabled forms, I won't even attempt it.
Comment #68
jedihe CreditAttribution: jedihe as a volunteer commented@mozh92: #61 and https://www.drupal.org/files/issues/2493183-71-ajax-support.patch can not be applied together. I think #61 does everything that https://www.drupal.org/files/issues/2493183-71-ajax-support.patch does (only exception may be calling .reset() when the behavior is triggered again in a form that was already processed, but I don't yet know why is that necessary).
Comment #69
jedihe CreditAttribution: jedihe as a volunteer commentedUsing Drupal.ajax.prototype.beforeSubmit() for this may require https://www.drupal.org/node/1907932; this is in order to halt the AJAX submission while the reCaptcha request is performed asynchronously; later, the callback can be used to re-trigger the AJAX submission, but this time with a flag that should let it run in its entirety.
Comment #70
jedihe CreditAttribution: jedihe as a volunteer commentedComment #71
mozh92 CreditAttribution: mozh92 commentedI try this do, but I no have high experience
Comment #72
edchan CreditAttribution: edchan commentedI'm using 7.x-2.2 and would like to implement the invisible reCaptcha. I've used #17 patch but I'm getting "The answer you entered for the CAPTCHA was not correct." How to make this work? Thanks.
Comment #73
mikemadison CreditAttribution: mikemadison at Acquia commentedThe invisible captcha patches and seems work fine on the 8.2.x-dev branch. Are there specific concerns other than being able to add an invisible captcha and seeing that it triggers validation when it should (and doesn't otherwise)?
Comment #74
jerry CreditAttribution: jerry commentedIf this is working acceptably now, at least for conventional single-form applications, I'd love to see it back-ported to D7 soon. I have a lot of D7 clients that I need to migrate from Mollom before it shuts down, and I expect that I'm hardly the only one in that situation.
Comment #75
hass CreditAttribution: hass commented@jerry: you can still use the module. No need to wait for invisible recaptcha.
I remember some people reported issues with above patch that are not fixed yet.
Comment #76
jerry CreditAttribution: jerry commentedUnderstood (and thanks), but I hope to wait for the invisible recaptcha if possible as it provides a user experience closer to Mollom's (no visible captcha in most cases).
Comment #77
mikemadison CreditAttribution: mikemadison at Acquia commentedthe patches worked for me!
Comment #78
mikemadison CreditAttribution: mikemadison at Acquia commentedComment #79
id.aleks CreditAttribution: id.aleks at Drudesk for PMMI Media Group commentedI have almost finished applying that patch for webforms form. I will try to complete it and update here in near feature.
Comment #80
hass CreditAttribution: hass commentedThere have been bugs / issues reported with this patch.
Comment #81
id.aleks CreditAttribution: id.aleks at Drudesk for PMMI Media Group commentedComment #82
id.aleks CreditAttribution: id.aleks at Drudesk for PMMI Media Group commentedComment #83
mstef CreditAttribution: mstef commentedIs this any different than https://drupal.org/project/antibot ?
Comment #84
id.aleks CreditAttribution: id.aleks at Drudesk for PMMI Media Group commented@mstef antibot uses another method to indicate a bot. For example, it waits for a mouse to move to indicate that the visitor is human. This module provides a Google Recaptcha functionality.
Comment #85
esod CreditAttribution: esod at Memorial Sloan Kettering Cancer Center commentedThe patch is causing us to not be able to contact reCAPTCHA. With 8.x-2.x-dev ((HEAD detached at 572d857)) ...
When I change the widget size back to Normal, reCAPTCHA is contacted again.
Comment #86
dandaman CreditAttribution: dandaman at August Ash commentedesod,
When you register for a new site with Google, you have to choose between reCAPTCHA V2 or Invisible reCAPTCHA. So maybe you have to get a new API key for Invisible to work?
Which also brings up a question: Can an API request tell what type it is? So maybe we could even detect the type and display it accordingly? (I'm not sure this is how it works... I'm just noticing how it looks from the above registration screen--that it seems you sign up for an API key for the classic reCAPTCHA or the Invisible reCAPTCHA.)
Comment #87
esod CreditAttribution: esod at Memorial Sloan Kettering Cancer Center commented@dandaman, redoing my keys with Invisible reCAPTCHA does get my site contacting reCAPTCHA again using the widget size invisible. Thanks.
However, the reCAPTCHA is never invisible and after ten page reloads it never launches the reCAPTCHA widget itself.
Comment #88
esod CreditAttribution: esod at Memorial Sloan Kettering Cancer Center commentedComment #89
esod CreditAttribution: esod at Memorial Sloan Kettering Cancer Center commentedPlease ignore the screen shot recaptcha-no-contact.png. It's there by mistake.
I am seeing g-recaptcha on the page here:
As well as the protected by reCAPTCHA sticker.
Now if I can just get the reCAPTCHA widget itself to fire...
Comment #90
kybermanI tested patch #56 and it works without problems.
Comment #91
gerzenstl CreditAttribution: gerzenstl at 42mate commentedI applied patch #56 and it works without problems. Thanks!
Comment #92
esod CreditAttribution: esod at Memorial Sloan Kettering Cancer Center commentedWe're also going to use this patch, but not on a modal or in an ajax form.
Note that the reCAPTCHA only fires when Google decides you're a bot or a mischief maker.
It's recommended (not sure by whom; maybe Google, maybe a post I read that seemed knowledgeable) to use CSS to hide the recaptcha badge. Which makes sense. A snippet like this is working for us:
You can also uncheck "Add a description to the CAPTCHA" at /admin/config/people/captcha and the result is truly invisible reCAPTCHA.
Comment #93
hswong3i CreditAttribution: hswong3i commentedUpdate #56 via latest 8.x-2.x-dev
Comment #94
davemybes CreditAttribution: davemybes as a volunteer commentedWorks great even with latest 2.3 release. Thanks!
Comment #95
hass CreditAttribution: hass commented#80
Comment #96
gg4 CreditAttribution: gg4 commentedSpent a bit of time with this issues trying to track down the remaining open issues...
I addressed #27 in a new patch attached here.
#31 Multiple invisible reCAPTCHAs on a single page is still an issues, but maybe should be blocked by #1833822. This issue can be reproduced by using Drupal's standard install profile, and enabling the User login block in the Sidebar first region on the Website feedback form, and enabling the invisible reCAPTCHA on both. User login will fail.
Ajax form submission on a form provided by Webform module seemed to work fine.
If we can round up any other open issues, I can take a pass at resolving them.
Comment #97
gg4 CreditAttribution: gg4 commentedActually patches this time.
Comment #98
gg4 CreditAttribution: gg4 commentedNeeds review for the testbot.
Comment #99
gerzenstl CreditAttribution: gerzenstl at 42mate commented@bonus, I think that is related on what is reported on #2493183.
The patch looks good.
Comment #101
jedihe CreditAttribution: jedihe as a volunteer commentedStarting from #61, I implemented AJAX support for normal and compact reCAPTCHA (invisible is too hard, AFAIK). Patch attached, also attaching interdiff vs. #61.
Tested on a form loaded inside an AJAX modal (ctools modal, leveraging modal_forms module).
Apologies if this isn't the best issue to post this, I considered #2493183, but given I started from a patch from here it seemed more natural to post it here for proper context.
Comment #102
jedihe CreditAttribution: jedihe as a volunteer commentedSwitching to 7.x-2.x to check if the existing tests still pass. No tests yet for the AJAX functionality, sorry.
Comment #103
jedihe CreditAttribution: jedihe as a volunteer commented7.x tests queued, I guess switching to 8.x-2.x-dev won't interrupt those.
Comment #105
jedihe CreditAttribution: jedihe as a volunteer commentedOh boy, I haven't learned how to talk to the test bot :(. Trying again...
Comment #106
jedihe CreditAttribution: jedihe as a volunteer commentedUgh, one more try... (same patch and interdiff as 101).
Comment #108
jedihe CreditAttribution: jedihe as a volunteer commentedTrying to fix pre-existing tests.
Comment #109
jedihe CreditAttribution: jedihe as a volunteer commentedComment #110
millionleaves CreditAttribution: millionleaves commentedI just applied the patch in #97 to the latest release version (which is dated after the current -dev version).
It appears to work (how to trigger an captcha challenge when using invisible captcha?), but I when I enabled a description ("prove you're not a robot") and customised it, the Catcha box appeared with that message in it, but no captcha. Not very invisible!
Disabling the description made the form disappear.
Comment #111
Reuben Unruh CreditAttribution: Reuben Unruh at Denver Public Library commentedTo trigger reCAPTCHA, use the user agent
Googlebot/2.1
. I think the easiest way to change your user agent without installing a chrome plugin is by creating a new device in Chrome DevTools.Comment #112
Pawprint CreditAttribution: Pawprint as a volunteer commentedRe. the patch in #108, I had a bit of a problem integrating this into one of my client's sites - it eventually boiled down to me taking a closer look at this line in recaptcha.invisible.js:
$form.find('input[type="submit"]').click(function (e) {
All the auto-generated forms on this particular client's website actually have
<button type="submit">
as their means of submitting the form, however there potentially are other ways to submit a form too:Button elements with no type attribute
An input with a type of "image"
A button outside the form, linked to the form through the use of the form attribute, e.g.:
Comment #113
GaëlGI could not apply #97 because I had already applied the patch from #2493183: Ajax support / Use behaviors. Here's a patch that will apply only if you already applied this one before: https://www.drupal.org/project/recaptcha/issues/2493183#comment-12537531
Comment #114
gg4 CreditAttribution: gg4 commented@hass, or anyone else, what else do we need to accomplish in the scope of this issues given #97?
Comment #115
hass CreditAttribution: hass commentedFixing the issues that different people have reported. Code seems not stable and reliable.
Comment #116
gg4 CreditAttribution: gg4 commentedThanks, @hass. All reported issues are either part of separate reported issues or addressed in my latest patch, I believe. I am very willing to help move this issue forward. Would you want me to start combining issues? Or, do you or anyone else have any other feedback on outstanding bugs in this issue -- I went through all the back comments and not seeing anything specifically called out?
Comment #117
jofitz CreditAttribution: jofitz at ComputerMinds commentedReroll of the patch in #113 to apply against the latest patch (#110) of #2493183: Ajax support / Use behaviors.
Comment #118
jofitz CreditAttribution: jofitz at ComputerMinds commentedOops, didn't want to run that patch past the testbot - it's obviously gonna fail.
Comment #120
james.williams CreditAttribution: james.williams at ComputerMinds commentedI found the following issues with patch 117 / 97:
1) Drupal.Ajax.prototype.beforeSubmit() is totally replaced, so no other module can do similar and 'hook in' to this. So I've ensured the previous version of the function is still called too. (Other replacements for the function ought to always do similar, so it shouldn't matter which order the overrides are made. Even if they don't, let's set a good example.)
2) For me, my ajax behavior binds to the mousedown event before the new one in recaptcha.invisible.js is bound. (Presumably just because ajax.js comes before our JS file in the source order). This means that the beforeSubmit() gets called before the clickedSubmit variable is correctly set, and so the AJAX is never aborted, and thus fails validation (because recaptcha hasn't yet had chance to execute before sending the POST data). So instead of checking clickedSubmit at that point, check for a custom data property, which gets set in the initial each loop that binds our own mousedown/click handlers.
3) There is a use of
.ajaxSend()
that will run for every time behaviors are attached. So I've avoided that (by setting a data property on the document and only binding when it hasn't previously been set).4) Some browsers won't support checkValidity() for HTML5 form validation. So only call that if it is available (otherwise, the form is always considered valid enough to submit to the server anyway, i.e. the pre-HTML5 behavior).
5) For those that do support checkValidity(), as the default browser behavior is aborted, the browser may not actually show the HTML5 validation errors. So I've added a call to reportValidity(), which should do this.
Comment #121
james.williams CreditAttribution: james.williams at ComputerMinds commentedAnd here's a version that compatible with #2493183-111: Ajax support / Use behaviors.
Comment #122
hswong3i CreditAttribution: hswong3i commented#121 reroll via latest recaptcha-8.x-2.x-dev, apply after ajax patch #114
Comment #123
sokru CreditAttribution: sokru as a volunteer commentedHere's a D7 re-roll #108 against latest dev. But I get following browser console error: `reCAPTCHA couldn't find user-provided function: drupalRecaptchaOnLoad - recaptcha__da.js:426 `.Edit: Patch missed recaptcha.js and recaptcha.invisible.js
Comment #124
sokru CreditAttribution: sokru as a volunteer commentedProper re-roll of #108.
Comment #125
sokru CreditAttribution: sokru as a volunteer commentedManually tested #124 and it seems to be working as expected.
Comment #126
hswong3i CreditAttribution: hswong3i commented#122 reroll via latest recaptcha-8.x-2.x-dev, apply after ajax patch #115
Comment #127
hswong3i CreditAttribution: hswong3i commentedComment #132
gg4 CreditAttribution: gg4 commentedAlthough valuable, all of these combination patch comments are really distracting from moving this issue forward. Does anyone have additional feedback on #97 and what additional outstanding issues need to be addressed?
Comment #133
gg4 CreditAttribution: gg4 commentedIf not, does someone want to RTBC #97?
Comment #134
james.williams CreditAttribution: james.williams at ComputerMinds commented@bonus - not #97, no, because of the points I listed in comment #120. Given much of the recent work in this ticket has built upon #2493183: Ajax support / Use behaviors, I suggest getting that one sorted first?
Comment #135
hass CreditAttribution: hass commentedNope.
Comment #136
hswong3i CreditAttribution: hswong3i commented#126 reroll via latest 8.x-2.x-dev (please don't ask for interdiff because for upstream changes).
recaptcha-ajax-2493183-127+nocaptcha-2852269-136.patch
: apply after ajax patch #129, can't test with CIrecaptcha-nocaptcha-2852269-136.patch
: complete patch via 8.x-2.x including ajax patch #129, can test with CITest passed locally, need CI check.
Comment #137
james.williams CreditAttribution: james.williams at ComputerMinds commentedThanks @hswong3i, looks fine :-)
Comment #138
hswong3i CreditAttribution: hswong3i commentedFixup: as long as
noscript
support removed, the new$recaptcha_src_fallback
no longer required, too ;-)Comment #139
harveyk CreditAttribution: harveyk commentedHi @hswong3i the
recaptcha-nocaptcha-2852269-139.patch
works perfectly on both a fresh install added to the login form and on a site with webforms. Thank you!Comment #140
hswong3i CreditAttribution: hswong3i commentedSyntax cleanup for
$captcha['form']['#attached']['library'][] = 'recaptcha/recaptcha';
, better sync with #2493183: Ajax support / Use behaviors style.Comment #141
hswong3i CreditAttribution: hswong3i commentedRemove all
<noscript>
related test cases as no longer valid.Comment #142
hswong3i CreditAttribution: hswong3i commentedComment #143
harveyk CreditAttribution: harveyk commentedHi All,
I had an issue with invisible reCAPTCHA preventing client side validation. I was using jQuery validate and when I would click the submit button no validation would occur. In order to fix this I slightly modified the preventFormSubmit function of recaptcha.invisible.js by checking to see if novalidate was set, as it was with my form.
Old code:
New code:
Now the form successfully validates upon completion of the challenge if it is triggered. Otherwise it validates normally.
I am essentially forcing the captcha to validate before the client side validation runs. Can anyone chime in on this, maybe with a better solution to this problem?
Comment #144
james.williams CreditAttribution: james.williams at ComputerMinds commented@harveyk good spot, yes, a check needs adding for that attribute.
I've lost track of how the patches are being made in combination with #2493183: Ajax support / Use behaviors. We really need that one progressed towards commit. So due to that, I'm only attaching a single patch & interdiff, sorry!
Comment #145
hass CreditAttribution: hass commentedPlease add documentation to all conditions and not so obvious settings in the js files. Something that explains the code in detail and its intention. On many lines I have codewise no idea why the condition exists and what it covers/does. This mostly affects recaptcha.invisible.js. Better write more than less. We need to be able to directly understand the code - without reading every comment in this case why a change was done.
Comment #146
veronicaSeveryn CreditAttribution: veronicaSeveryn at Inclind Inc commentedCan we also either document somewhere for everyone to remember OR find a better selector for the code referencing to submit buttons assuming they have markup of
<INPUT>
element?Several sites I have worked on do have theme alterations which replace
<INPUT>
with<BUTTON>
markup on form submission buttons, and then the whole Recaptcha detection functionality fails, always saying "The answer you entered for the CAPTCHA was not correct." because nothing is in fact being verified with Google on submit.I keep forgetting about this but and keep banging my head around it for hours until I come back to the same discovery :))
I believe it relates to both patches: D7 and D8
Comment #148
hswong3i CreditAttribution: hswong3i commentedPatch reroll via latest 8.x-2.x-dev, with #144 changes + minor bugfix (see interdiff)
Comment #149
hswong3i CreditAttribution: hswong3i commentedPatch #148 reroll via 8.x-2.x-dev...
No interdiff (just diff) could be given due to following error message:
How annoying for a child issue for another RTBC issue...
Comment #150
gg4 CreditAttribution: gg4 commentedJust a note that the combo patch from #14 no longer applies.
Comment #151
Chizh273 CreditAttribution: Chizh273 commentedHi guys
I've found a bug with multiple recaptcha on one page. If you connect recaptcha to more them one form, recaptcha validation token always will be added to the first form. And after submit second form you get error 'The answer you entered for the CAPTCHA was not correct.'
I added fix
Comment #153
gg4 CreditAttribution: gg4 commentedComment #154
gerzenstl CreditAttribution: gerzenstl at 42mate commentedPatch recaptcha-nocaptcha-2852269-151.patch on #151 works fine.
But as last test shows, recaptcha-ajax-2493183-156+nocaptcha-2852269-151.patch fails to apply the patch. I manually merged the changes between nocaptcha-2852269-151.patch and recaptcha-ajax-2493183-156.patch, but nocaptcha isn´t working on ajax forms.
Comment #155
chOP CreditAttribution: chOP commentedUp until recently we had been using the patch in #97 with
drupal/core : 8.5.6
drupal/webform : 5.0.0-rc18
drupal/recaptcha : 2.3
The no-captcha display for reCAPTCHA stopped working on Webforms using a File upload field after updating to
drupal/core : 8.5.8
drupal/webform : 5.0.0-rc26
I've now tried updating our drupal/recaptcha to use the latest patches above, however the problem remains. We get variations on this ajax alert message, when using a File Upload field button.
The Ajax error is triggered in Drupal core -
docroot/core/misc/ajax.js
at line 327See https://cgit.drupalcode.org/drupal/tree/core/misc/ajax.js?h=8.5.x#n327
Switching back to the default display for reCAPTCHA addresses the issue on the affected forms. This has only hit webform forms using a File Upload field so far.
Comment #156
cbe243 CreditAttribution: cbe243 commentedI tried patch #124 and it doesn't work: "The answer you entered for the CAPTCHA was not correct."
I tried with both the dev and stable version.
D7
Comment #157
TimRutherford CreditAttribution: TimRutherford at Acro Commerce commentedHey guys,
I've updated the D7 patch from #124 to work with ajax forms. Tested on latest dev branch with Captcha 7.x-1.5.
Comment #158
cbe243 CreditAttribution: cbe243 commentedI tried the last patch of Tim (#157) and I get "The answer you entered for the CAPTCHA was not correct".
Comment #159
ransomweaver CreditAttribution: ransomweaver commentedI also get "Answer not correct" after submitting: recaptcha dev with patch #157. I do see the recaptcha icon in the lower right corner, so it seems to be initializing.
Comment #160
mr.york CreditAttribution: mr.york at Agence Inovae commentedReroll last patch.
Comment #162
mr.york CreditAttribution: mr.york at Agence Inovae commentedAdd jquery backward compatibility.
Comment #163
mr.york CreditAttribution: mr.york at Agence Inovae commentedReroll D8 patch.
Comment #164
mr.york CreditAttribution: mr.york at Agence Inovae commentedGood file ;).
Comment #165
hswong3i CreditAttribution: hswong3i commentedPatch #151 reroll via recaptcha-8.x-2.x, also include the new fix as #2493183-160: Ajax support / Use behaviors mentioned:
Comment #166
hswong3i CreditAttribution: hswong3i commentedComment #167
hudriInstalled and manually tested #165 (without ajax) on multiple sites, all work fine.
Comment #168
malcolm_p CreditAttribution: malcolm_p commented#164 fails for me on an AJAX form under the following conditions:
1. Submit a form with server-side validation that fails. This returns an error message.
2. Correct the error and submit again. The form cannot be submitted.
This appears to be caused by the
jQuery(clickedSubmit).unbind('.recaptcha');
, removing that line fixes the issue for me. Without this successive validatation attempts are blocked bypreventFormSubmit
.For #165 Is the claim that #2219993 created a regression? I'm not seeing that myself, the cacheable captcha element has been working fine.
Comment #169
bjaxelsen CreditAttribution: bjaxelsen commentedUpdating D7 patch from @mr.york #162
Comment #171
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedThis is a re-roll of the combined patch merging #165 & https://www.drupal.org/project/recaptcha/issues/2493183#comment-12970759, that hopefully applies and passes.
This combined patch does not attempt to address any outstanding items, such as https://www.drupal.org/project/recaptcha/issues/2493183#comment-12947548. It only attempts to merge the two latest working patches for these respective issues. It also does not include the fix described in #160.
Comment #172
timcosgrove CreditAttribution: timcosgrove at Pinterest commentedUpdated patch:
1. Removes the test for the fallback asset that https://www.drupal.org/project/recaptcha/issues/2493183#comment-12970759 added, as #165 removes the fallback asset and the other issue doesn't seem to otherwise make use of the fallback.
2. Fixed a number of code style violations.
Comment #173
rmpereira CreditAttribution: rmpereira as a volunteer commentedI tried the patch #162 with an upload field (ajax) in my form and I get "The answer you entered for the CAPTCHA was not correct".
I use the invisible Recaptcha and I have no javascript/PHP error.
Comment #174
veret CreditAttribution: veret commented@rmpereira I had the same issue, because recpatcha event was attached only to 'input', while in my case it had to be attached to form 'button'. It might be similar in your case. You can try attached patch recaptcha-2852269-174-7.x.patch.
Attached you can find updated patch from #162 and #169:
Comment #175
veret CreditAttribution: veret commentedUpdated patch from #174 with fixed paths.
Comment #176
Simon Georges CreditAttribution: Simon Georges at Makina Corpus commentedChanging status after some new patches have been posted.
Comment #177
james.williams CreditAttribution: james.williams at ComputerMinds commentedIt's not clear if the issue in comment 168 has been addressed yet? The patch in comment 169 did not contain an interdiff and suggest it is just an update of a patch from before comment 168.
Comment #178
Simon Georges CreditAttribution: Simon Georges at Makina Corpus commentedIndeed… I apologize if I was hasty in changing the status.
Comment #179
hass CreditAttribution: hass commentedComment #180
hswong3i CreditAttribution: hswong3i commentedI just give a simple reroll to #165 via latest dev...
P.S. Sorry I am not a big fans to add in more fix for this issue...
It already get stuck since 14 Feb 2017...
At least #165 working happily for my client(s) for more then 3 months...
Please kindly let it RTBC...
Comment #181
rmpereira CreditAttribution: rmpereira as a volunteer commented@veret Thx for the patch #174 but it does not work completely in my case.
My steps to reproduce the problem :
1) I select a file and i click on the upload file button.
2) The file is uploaded but the form is reload and i have the drupal message "The answer you entered for the CAPTCHA was not correct."
3) I click on the form submit button, the form is validate and i redirected to the confirmation page.
Only the step 2) is problematic.
Comment #182
zkrebs CreditAttribution: zkrebs commentedApplied #175 on d7-dev, it appears to work on user/login but on a node submission form it still states "The answer you entered for the CAPTCHA was not correct" even after cache cleared.
Comment #183
zkrebs CreditAttribution: zkrebs commentedApplied #175 on d7-dev, it appears to work on user/login but on a node submission form it still states "The answer you entered for the CAPTCHA was not correct" even after cache cleared.
Comment #184
sanjay.maharjan CreditAttribution: sanjay.maharjan commentedHi @timcosgrove,
I have applied patch mentioned in #172. Everything is fine except the file upload section in webforms. I have ajax enabled in my webform and while trying to upload a file, it gives me `An error occurred while attempting to process /form/your-webform-with-invisible-recaptch-enabled?element_parents=elements/upload_container/resume&ajax_form=1&_wrapper_format=drupal_ajax: options is undefined`
Is anyone getting this error?
Thank you!
Comment #185
aprice42 CreditAttribution: aprice42 at ThinkShout commentedI made a couple of minor adjustments to the D7 patch at #175 to prevent this creating double submissions due to the redundant call to both
.mousedown()
and.click()
in recaptcha.invisible.jsI also added logic to recaptcha.invisible.js to allow for a class
.ignore-captcha
to be added to a submit element to prevent it from triggering a captcha submission.Comment #186
jimconte CreditAttribution: jimconte commentedI tried applying #180 to latest 8.8.1 but patch does not apply
Comment #187
goron CreditAttribution: goron commentedRegarding the changes in #185: I don't think it makes sense to only trigger the
mousedown
event in theonInvisibleSubmit()
callback. I think most forms don't submit with mousedown on a button (since that also fires if the mouse is pressed over the button but released outside of it, or the right mouse button is pressed). Using that latest patch didn't work on any forms on a site I tested it with for this reason.If one event is used, I think it should be
click
. Or if there's good reason to support both, then some solution can be used to make sure the form is not submitted twice (like maybe - fire mousedown event, in a submit event handler set some state on the form to indicate submission has happened, fire click event only if that state is not set). I'm just not sure whether mousedown event is really needed here. Maybe someone can point to an example where it is?Attaching a patch that is the same as #185 except using the click event.
Comment #188
danyg CreditAttribution: danyg commentedI tried the patch of #185 comment. Unfortunately, I wasn't able to make it work. I always get the following error message in console: "reCAPTCHA couldn't find user-provided function: drupalRecaptchaOnLoad"
I tried to uncomment that line, the message has been disappeared, but Catcha gives error on submit: "The answer you entered for the CAPTCHA was not correct." (of course I'm not able to give answer for invisible captcha).
What did I miss?
UPDATE: sorry, I didn't notice that added js files went to my root folder, not into the folder of recaptcha. It works for now as I expected, I had to hide the fieldset legend and description by css.
Comment #189
Kris77 CreditAttribution: Kris77 commentedI found this two module:
What do you think?
Comment #190
ShaunDychko CreditAttribution: ShaunDychko as a volunteer commentedThis is a supported version of reCAPTCHA V3.
Comment #191
veronicaSeveryn CreditAttribution: veronicaSeveryn at Inclind Inc commentedStill having an issue (mentioned in #155) with Recaptcha JS on webforms that have FILE UPLOAD buttons.
From what I debugged (see screenshots): Recaptcha JS is looking for SUBMIT type button, and these File Upload buttons are falling into the same category and screw JS logic, which doesn’t rely on the proper button in this case. Recaptcha JS finds 3 buttons on the form in my use case. Hence, further processing is not applicable correctly.
I haven't figured out the best way to bypass these buttons. Webform markup/classes might change in the future..
Unless we have to go around with manually adding a
.ignore-captcha
class to buttons on webforms that don't have to be accounted for (as proposed in #185). Or it can be somehow incorporated into Recaptcha settings (provide an option on admin settings, for example, to exclude File Upload buttons and add form alteration hooks) ?Comment #192
hudriPlease, please, please stop "fixing" this issue and let it continue to RTBC. I've been using all of @hswong3i's patches for the latest stable 8.x-2.x versions since 2 years on over 50 production sites with a few hundred thousand webform submissions in total and it works really well.
Even if there are outstanding issues, please do not fix them here, but create follow-ups. The current work is ready for production!
Comment #193
TLWatsonThe D8 version maybe, but I'm still having the same issues in D7 as previously mentioned after applying the latest patch.
Users get the "answer not correct" error, the logs say that the user answered "Google no captcha"... and it appears that this is only happening on forms with file uploaders.
Comment #194
alexandru.dumitru CreditAttribution: alexandru.dumitru commentedCurrent implementation for D8 breaks HTML5 validations.
Steps to reproduce:
1. Create a new webform with required fields
2. Add an invisible captcha to webform
3. Submit webform without filling the required field
4. The form will not submit and focuses on the field but the html5 error is hidden
Expected:
HTML error should be displayed
Comment #195
alisonRe: #193 and others (and, I'm new to the thread so I apologize if I'm misunderstanding the backstory):
Shouldn't the D7 implementation be in its own thread, or?
Comment #196
gugalamaciek CreditAttribution: gugalamaciek at Government of Flanders commentedI can confirm problems with forms, where files can be attached (see #191). I'm attaching improved patch, which will change this:
var $formSubmit = $('input[type="submit"], button[type="submit"]', $form);
into this:
var $formSubmit = $('.form-actions input[type="submit"], .form-actions button[type="submit"]', $form);
For me it fixes the problem, but I'm not sure if this is the best approach. But I don't have better now.
Comment #197
torotil CreditAttribution: torotil at more onion commentedHow about splitting out the D7 version into its own issue?
I’ve reviewed #196 and found one additional issue (apart from how file uploads should be handled): On AJAX submit buttons the
beforeSubmit()
callback is overwritten. For compatibility with other scripts that might do that the original handler should be backed up and called when doing this.Comment #198
torotil CreditAttribution: torotil at more onion commentedI’ve opened #3201620: D7: Integrate invisible captcha to have a clean D7 version and opened a merge request there.
I’ve started with the patch in #185 and #196 and made a few improvements:
Comment #199
ksenzeeNow that the D7 patch is in its own issue, here's a new patch for D8/9. The current patch for D8/9 was at #165, and it works well (we've had the combined patch at #172 in production for years) except for the issue brought up in #184 and #191, which is that webform file uploads are broken. This patch addresses that by keeping elements with the
formnovalidate
attribute out of the recaptcha flow. That's logical anyway, because recaptcha will submit the whole form as soon as it succeeds, and you only want that behavior on the real form submit.Comment #200
cgmonroe CreditAttribution: cgmonroe as a volunteer commentedThe recaptcha-ajax-2493183-164+nocaptcha-2852269-199.patch in #199 does not apply to the new 8.x-3.1 release. The problem is with the test update.
Attached is an updated version that will apply to the new release. I *think* I got the test issues resolved but these may need to be tweaked.
We have been using the patch from 199 with no problems on our sites.
Comment #202
hudriPatch #200 breaks checkbox reCaptchas. If I apply this patch, forms with a checkbox reCaptcha will show this message in the console:
Comment #203
cgmonroe CreditAttribution: cgmonroe as a volunteer commentedMea Culpa...
Git diff does not include untracked files. So the -200 patch is missing a new recaptcha.library.yml and a couple of files in the js directory. Didn't catch it with our testing because the new files existed in our code and the patch worked without creating them.
Here is a new patch that includes the new required files. This adds back the missing drupalRecaptchaOnload function.
Comment #205
guardiola86 CreditAttribution: guardiola86 at Full Fat Things commentedThanks @cgmonroe. That patch works with 9.3 as well
Comment #206
hswong3i CreditAttribution: hswong3i commentedRe-roll #203 with 8.x-3.x-dev
Comment #208
drupov CreditAttribution: drupov commented3.x is incompatible with https://www.drupal.org/comment/reply/2493183, as mentioned several times above for the 2.x.-branch
Comment #210
smokrisI opened an issue fork consisting of hswong3i's patch from comment #206, plus a commit to remove another stray reference to the removed
$noscript
variable.Comment #212
NuWans CreditAttribution: NuWans as a volunteer and at Niji commentedI'm on drupal 10 and recaptcha 3.2, the patch is not applicable on this version. Does anyone use it on this version? Is it planned to adapt?
THANKS
Comment #213
dchaffin CreditAttribution: dchaffin as a volunteer commentedWhat is the status of this? I would really like to be able to update to reCaptcha v3. Thanks!
Comment #214
roxflame CreditAttribution: roxflame at Xequals commented@dchaffin, I suggest using this other module while we wait for this to be integrated here
https://www.drupal.org/project/recaptcha_v3
You can use it as the primary captcha, and have it fall back to this module if it fails validation.
Comment #215
Anybody@smokris this please needs a rebase.
All others: Once rebased, please test the MR and check if it's working. Can someone help about the documentation, please? (Needs documentation tag)
I hope we can then integrate this soon.
For the next time, I think it might make sense to add such new features as (experimental) separate submodules so we don't have to fear breaking something in production for the existing functionality?
Comment #216
smokrisRebased.
Comment #217
Anybody@smokris thanks! There's still a TODO in the IS, is that old or still to TBD? Sorry I don't have much time currently, so further community help would speed up the process here for sure.
Comment #218
AnybodyComment #220
dark05 CreditAttribution: dark05 commentedHello :-) It works with ReCaptcha version 3.2.0 and patch
Thanks
Comment #221
OwilliwOSadly, PR 15 diff is not applicable on top of 3.2 stable version.
And the applicable patch from comment #206 is using an undefined variable $noscript (creating a PHP warning).
Here is a quite patch I've applied on top of V3.2 + patch #206.
Not sure why, but I've not been able to generate a full patch including this variable removal. Sorry about that.