VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: phal on November 23, 2020, 13:58:03 PM

Title: Duplicated captcha on registration page after upgrade
Post by: phal on November 23, 2020, 13:58:03 PM
Help! I migrated from VirtueMart 1.1.7 to 3.8.6. Everything works fine except the user registration page. When I turn on "Use ReCaptcha for Registration" I get two/double Recaptcha in the registration page instead of one. This happens with the normal 2.0 plugin and the Securimage plugin. Changing template has no effect. Changing the default captcha in the Global Config under Site tap has no effect. Other components such as contacts enhanced does not have this issue. I noticed the shopper fields were duplicated after migration and had to delete, could this be something similar?

Title: Re: Duplicated captcha on registration page after upgrade
Post by: Jumbo! on November 23, 2020, 16:33:14 PM
Disable the Captcha plugin which you do not want to see.
Title: Re: Duplicated captcha on registration page after upgrade
Post by: phal on November 23, 2020, 18:23:45 PM
When I enable only one Captcha plugin, that plugin gives me two of the SAME Captcha I need to pass. The Captcha is repeated twice.
Title: Re: Duplicated captcha on registration page after upgrade
Post by: pinochico on November 23, 2020, 20:15:13 PM
look on the override template
Title: Re: Duplicated captcha on registration page after upgrade
Post by: Jumbo! on November 24, 2020, 08:50:06 AM
I think it is a problem created by the Securimage plugin. Disable the same and check again.
Title: Re: Duplicated captcha on registration page after upgrade
Post by: pinochico on November 24, 2020, 09:06:58 AM
I think I will cook chicken today, maybe my ideas will also help you.
They have the same value as if I wasted time guessing what didn't work for you without your information - the ones you sent won't help me personally, the reason may be different.
Just by not sending the URL of the website - you are making the treasure game more interesting.
Title: Re: Duplicated captcha on registration page after upgrade
Post by: phal on November 24, 2020, 11:10:21 AM
Thanks guys for all the suggestions. I disabled Securimage the problem persists, I changed template the problem persists. To save time I went to VM Framework Loader Plugin and disabled Virtuemart redirect login and use the Joomla login instead for now.
Title: Re: Duplicated captcha on registration page after upgrade
Post by: jenkinhill on November 24, 2020, 18:04:29 PM
I can demonstrate the same problem with ReCaptcha type2, two "boxes" on the registration page, but only one on the ask question form. No problem when using invisible ReCaptcha, only a single occurrence on registration.

Has been referred upwards.
Title: Re: Duplicated captcha on registration page after upgrade
Post by: stAn99 on November 24, 2020, 21:01:06 PM
hello, i helped with the new captcha plugin code on latest virtuemart to get it implemented, so that VM supports multiple captcha systems, if you'd like i can help you with your double captcha problem during EU business time, please contact me during the day at support (at) rupostel.com, i will need your:
- ftp access
- backend access

and i will check and fix this for you and report back to this forum on the issue and the fix.
best regards, stan, rupostel.com
Title: Re: Duplicated captcha on registration page after upgrade
Post by: jflash on January 16, 2021, 16:32:05 PM
Hello!

I have same problem: ReCaptcha displayed twice on this page: https://magnet.ee/et/virtuemart-account-maintenance/editaddress
But if i go to registration from cart i see it once: https://magnet.ee/et/virtuemart-account-maintenance/editaddresscartBT

If i removed captcha code from template override /templates/impulsashop/html/com_virtuemart/useredit_address.php then on first link i still have captcha twice but on second link i dont see captcha anymore. Or i am in wrong file?
Title: Re: Duplicated captcha on registration page after upgrade
Post by: jflash on January 19, 2021, 07:43:06 AM
Same with Protostar template, so it is not template issue :S
Virtuemart 3.8.6 10373, Joomla 3.9.24
Title: Re: Duplicated captcha on registration page after upgrade
Post by: Three_d on January 25, 2021, 16:43:06 PM
Same problem here.
I upgraded from Virtuemart 3.8.4 to 3.8.6.
After the upgrade the registration page shows 2 recaptcha boxes.
Title: Re: Duplicated captcha on registration page after upgrade
Post by: jflash on February 10, 2021, 13:26:11 PM
I updated Virtuemart to 3.8.8 but same problem :S
Title: Re: Duplicated captcha on registration page after upgrade
Post by: mcambou1 on June 11, 2021, 09:33:56 AM
Hi,

I have same problem, but no solution anyone found anything? (last version of virtuemart)
Title: Re: Duplicated captcha on registration page after upgrade
Post by: mcambou1 on June 11, 2021, 10:58:56 AM
Hi i found the solution for double recaptcha AND "invalid-keys" error

For the double recpatcha go on this file:
components/com_virtuemart/views/user/tmpl/edit.php

And comment the line 83, the captcha is already display at line 77

for the invalid keys error:

Display only one captcha plugin, VM don't check the one is chose in the general configuration, so just enable the one who chose to use.

Hope this post help someone
Title: Re: Duplicated captcha on registration page after upgrade
Post by: ufo_hk on April 28, 2022, 23:29:15 PM
Found this after upgrading a Virtuemart 2 site to Virtuemart 3.8.8 and thanks to mcambou1 it fixed my issue.

Why is this still occurring - shouldn't it be fixed permanently?

Thanks
Title: Re: Duplicated captcha on registration page after upgrade
Post by: jenkinhill on April 29, 2022, 12:26:23 PM
VM3.8.8 is from January 2021 and was the version containing the error. It's fixed in later versions.   
See news of the latest version here: https://virtuemart.net/news/506-virtuemart-4
Title: Re: Duplicated captcha on registration page after upgrade
Post by: semen_123 on November 20, 2022, 20:59:44 PM
Why did they add it?
\www\components\com_virtuemart\helpers\shopfunctionsf.php
line ~ 1195
$output = $dispatcher->trigger('onDisplay', array($reCaptchaName, $id, 'class="g-recaptcha required"'));

class="g-recaptcha required" causes a bug:

<div id="dynamic_recaptcha_1" class="class="g-recaptcha required" g-recaptcha" data-sitekey=....."

Please write a solution here
Title: Re: Duplicated captcha on registration page after upgrade
Post by: Jumbo! on November 21, 2022, 14:33:17 PM
Quote from: semen_123 on November 20, 2022, 20:59:44 PM
Why did they add it?
\www\components\com_virtuemart\helpers\shopfunctionsf.php
line ~ 1195
$output = $dispatcher->trigger('onDisplay', array($reCaptchaName, $id, 'class="g-recaptcha required"'));

class="g-recaptcha required" causes a bug:

<div id="dynamic_recaptcha_1" class="class="g-recaptcha required" g-recaptcha" data-sitekey=....."

Please write a solution here

Replace the code with the following.

$output = $dispatcher->trigger('onDisplay', array($reCaptchaName, $id, 'g-recaptcha required'));
Title: Re: Duplicated captcha on registration page after upgrade
Post by: Achille616 on February 27, 2023, 16:53:21 PM
Virtuemart 4.0.12.10777 is full of bugs. Wait for them to update a new version with a little more care. Install Version 3.8.9.10534 which works fine. Version 4 also has problems with sending system emails.. terrible. Tried to comment out line 83 but no success. I am sorry. Does anyone have other solutions?
Title: Re: Duplicated captcha on registration page after upgrade
Post by: Milbo on March 01, 2023, 19:35:03 PM
Please remove the doubled captcha from user/tmpl/edit

https://dev.virtuemart.net/projects/virtuemart/repository/diff/trunk/virtuemart/components/com_virtuemart/views/user/tmpl/edit.php?utf8=%E2%9C%93&rev=10795&rev_to=10649

Quote from: Jumbo! on November 21, 2022, 14:33:17 PM
Replace the code with the following.

$output = $dispatcher->trigger('onDisplay', array($reCaptchaName, $id, 'g-recaptcha required'));
Fixed
Title: Re: Duplicated captcha on registration page after upgrade
Post by: EIF on June 28, 2023, 15:50:35 PM
In what VM version is this fixed?

I use 4.0.12 with joomla 4.3.2 at the moment, but the double captcha is still there, but differently.

I tried removing the double captcha in de edit.php file. That works. So I now have 1 recaptcha box what I have to toggle. But.... at the same time the invisible recaptcha is active.
In the joomla settings I have the invisible captcha selected. The normal recaptcha was selectable, but I even disabled that plugin now.

When I disable "use recpatcha during registration" option in the VM settings, both are gone. Including the invisible. When I enable it, the normale and the invisible recaptcha is visible. (visible because of the 'protected by recaptcha' logo). I have no problem that both are active, but when I toggle the recaptcha "I am not a robot" I still get the error that I need to fill in the captcha...

What do I need to change to fix this?