News:

Support the VirtueMart project and become a member

Main Menu

Plugin ReCaptcha endlessly

Started by ec83, November 13, 2023, 14:39:48 PM

Previous topic - Next topic

ec83

Hello, I have noticed for 2/3 days that the Recaptcha plugin on the store has been running in a loop.
When you click on the check box the circle spins and nothing happens. It is therefore impossible to register.

https://ibb.co/q0jJzfz

Do you have an idea ?

There have been no recent technical changes to the store.
What do you think ? Have you encountered this problem recently.

Nothing special in the browser development console.

Thanks

Environment :
Joomla 3.10.12
Virtuemart 3.8.9 10514
PHP 7.4.33
MySQL 5.7.42

ec83

It seems that the problem comes from the Mootools Javascript library. There is an incompatibility with Google recaptcha. This mainly impacts Joomla v3.x.

While waiting for the migration to Joomla 4.x and Virtuemart 4.x, do you know of an alternative?
I tested the Amy Captcha extension https://aimy-extensions.com/ without success because it does not integrate with Virtuemart's registration form.

Thanks

Elboy

Could you disable mootools plugin?
I had the same problem in J3 (not with VM) and this plugin worked for me on contact forms
https://idealextensions.com/joomla-extensions/securimage-captcha-plugin.html

Emma Iana

Quote from: ec83 on November 20, 2023, 16:18:24 PM
It seems that the problem comes from the Mootools Javascript library. There is an incompatibility with Google recaptcha. This mainly impacts Joomla v3.x.

While waiting for the migration to Joomla 4.x and Virtuemart 4.x, do you know of an alternative?
I tested the Amy Captcha extension https://aimy-extensions.com/ without success because it does not integrate with Virtuemart's registration form.

Thanks

Hi,
disable mootools.

In my case it helped on captcha in Joomla but the one with VM after turning off mootools returns invalid-key. :(


ec83

Hello,
A patch was found for version 1.4.5 of mootools on this forum: https://github.com/google/recaptcha/issues/539

The solution must be able to adapt to version 1.4.2 to 1.6.0.
The modification consists of modifying the array.from function of mootools.

Array.from = function(item){
    if (item == null) return [];
    return (Type.isEnumerable(item) && typeof item != 'string') ? (typeOf(item) == 'array') ? item : slice.call(item) : [item];
};​


in this
Array.from = function(item){
    if(new Error().stack.indexOf('recaptcha') >= 0) return [].slice.call(item); // Single line added for reCaptcha fix
    if (item == null) return [];
    return (Type.isEnumerable(item) && typeof item != 'string') ? (typeOf(item) == 'array') ? item : slice.call(item) : [item];
};​


To avoid making the modification, the patched files (there are two versions of mootools, the normal one and the compressed one) can be found as an attachment. and they should be placed in the ROOT_of_site/media/system/js/

Remember to clear the cache to do the test.

Have a good day.

ec83

I also found an extension that may help. Be careful to check that Mootools is not used on other parts of your site.

https://extensions.joomla.org/extension/core-enhancements/performance/mootools-enabler-disabler

hotrod

  I went with hcaptcha...  works great now..
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0