User tests: Successful: Unsuccessful:
Pull Request for Issue #44294.
Fix getElementsByClassName().forEach is not a function for reCAPTCHA Invisble.
Caused by #42797
Install Joomla 4, activate reCAPTCHA Invisble somewhere.
Update to Joomla 5.
Or, code review, HTMLCollection
result of getElementsByClassName()
does not have forEach()
menthod.
reCAPTCHA Invisble broken
reCAPTCHA Invisble works
Please select:
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
I tried this fix on 2 sites where reCaptcha invisible broke with this error after upgrading to Joomla 5.2.0, and, while the error went away, the captchas still do not appear. I have both configured to display as inline reCaptchas and none of them are showing.
Thanks for the fix but, it seems bug's solution seems to be requiring more than using a different method. People are using different modules/plugins for forms and captchas. For example I use RSContact and reCAPTCHA v3, and my generated site code doesn't even have a class name of g-recaptcha, as queried by current and proposed code.
Something deeper is going on but I cannot find it. May be some J! code which was being used by 3rd party codes altered or deleted somewhere at v5.2 dev. I'll dig as I have time.
I cannot get recaptcha (v2 & v3) work with Joomla 5.2. hcaptcha requests challenge from user every time, (mostly) passive mode is for $99 monthly... So, for my basic needs, I decided to use Aimy Captcha-Less Form Guard (on RSContact and Joomla 5.2).
It seems odd to me that Joomla does not natively support a captcha mechanism 🤔
Tested on my 5.2 site, it does not work. The captcha logo does not appear. When i am using the js-files from Joomla 5.1.4 the captcha works as expected.
Same issue with Joomla 5.2.1
Fix does not work, had to replace the 3 files with the Joomla 5.1.4 ones
It seems Joomla's captcha interface (aforementioned js-files and "Default Captcha" global setting) is now broken. Observations at 5.2 and 5.2.1:
Labels |
Added:
Release Blocker
NPM Resource Changed
bug
PR-5.2-dev
|
Tested on my 5.2 site, it does not work. The captcha logo does not appear. When i am using the js-files from Joomla 5.1.4 the captcha works as expected.
Same issue with Joomla 5.2.1
Fix does not work, had to replace the 3 files with the Joomla 5.1.4 ones
@tschombes @fire2 @YasarYY How have you applied the fix from this PR here? As this PR is not merged yet, it was of course not included in 5.2.0 or 5.2.1. If you want to help that it becomes included in the upcoming 5.2.2, you can test that PR, because every PR needs 2 successful human test before it can be merged.
One way to apply the PR would be to download the update zip for that PR here
https://artifacts.joomla.org/drone/joomla/joomla-cms/5.2-dev/44306/downloads/80218/
and unpack the following files from that zip:
Then backup the existing 3 files on your site which you had copied from 5.1.4 and then replace the existing files by the one unpacked from the zip. Finally clear your browser cache to make sure your browser doesn't use the old, cached files and test if it works. Please report back the result in PR #44306 . Thanks in advance.
I have moved all my sites' captchas to either v3 or an other captcha solution. So I'm not able to test this. But, there is an open issue at Sharky's recaptcha-v3, mentioning it does not work with Joomla 5.2. So I tested this PR on it, as you described, and it didn't work. But since that is a v3 plugin, it may be irrelevant to this issue.
This fix seems to make the necessary code change, completing the code update at Minor cleanup for plugins JS PR, including using querySelectorAll instead of getElementsByClassName. But maybe something else is also broken, causing captcha issues at Joomla sites.
So, for me, I cannot test this PR for v2, and it didn't fix v3.
I have tested this item ✅ successfully on 9c78b5c
I've made a new installation of 4.4.9 and have successfully set up Google Recaptcha v2 invisible and have tested that it works in a contact form.
Then I've updated to 5.2.0 with Live Update ("Next" channel) and have reproduced the issue.
Then I've updated to this PR using Live Update with the custom update URL created by Drone and have verified that the issue is fixed, i.e. the captcha "button" is shown and the JS error mentioned in the issue does not appear. Sending a mail with the contact form protected by the captcha has worked.
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-11-10 19:34:48 |
Closed_By | ⇒ | Hackwar |
Thank you for this fix!
I have tested this item ✅ successfully on dfc56ea
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44306.