VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: David on March 16, 2017, 20:34:53 PM

Title: Troubles with captcha and registration
Post by: David on March 16, 2017, 20:34:53 PM
Working on localhost, J 3.6.5, VM 3.2.0

I wanted to add captcha to shopper registration. For this purpose, I have registered at www.google.com/recaptcha/ and enabled the Joomla Captcha - ReCaptcha plugin. Recaptcha was displayed in the VM registration form and everything seems to be OK. However:

When I fill in all required fields except captcha and click Register, I am redirected to index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT&captcha=1 (originally I was on index.php?option=com_virtuemart&view=user) and text of Register buttons changes to COM_VIRTUEMART_REGISTER_AND_CHECKOUT - i.e. suddenly I am in the middle of checkout process, although the original registration was initiated with no relation to checkout! Also the cart is empty.

After getting this behavior, I turned off the captcha plugin, so captcha is not displayed in the registration form now. However:

When I fill in all required fields and click register, AGAIN I am redirected as above, and again I get the message PLG_RECAPTCHA_ERROR_INCORRECT_CAPTCHA_SOL.

Anynone knows what is going on? Why this redirection? Why the captcha error message when the captcha plugin is disabled?
Title: Re: Troubles with captcha and registration
Post by: GJC Web Design on March 16, 2017, 20:54:49 PM
what template are u using?

if not std. then try with Protostar
Title: Re: Troubles with captcha and registration
Post by: David on March 16, 2017, 21:14:38 PM
The same under Protostar.
Title: Re: Troubles with captcha and registration
Post by: David on March 16, 2017, 22:12:31 PM
UPDATE: The second part was solved - it was necessary to turn off "Use reCaptcha in registration".
Title: Re: Troubles with captcha and registration
Post by: David on March 22, 2017, 13:30:36 PM
No answers?

I will briefly sum it up again. To replicate the undesired behavior, do the following:
1) Enable the ReCaptcha plugin and turn using ReCaptcha in VM shopper registration on
2) In shopper registration, fill in all required fields except the ReCaptcha
3) Click on Register and see where you are redirected.

The faulty redirection apparently comes from com_virtuemart\controllers\user.php.
Title: Re: Troubles with captcha and registration
Post by: jenkinhill on March 22, 2017, 17:05:26 PM
It has always worked correctly for me in the test version, and I just tested with the released version VM3.2 and you cannot leave the registration page without confirming the ReCaptcha. Using VM default templates.
Title: Re: Troubles with captcha and registration
Post by: David on March 22, 2017, 21:21:30 PM
I have uploaded the site; please try to register (without solving ReCaptcha) at http://www.pcsecurity.cz/test2/index.php?option=com_virtuemart&view=user and see for yourself.
I believe you will cope with the foreign language ;)
Title: Re: Troubles with captcha and registration
Post by: bart1983 on July 15, 2017, 13:24:08 PM
I have a little bit different question about captcha.
I have set vm (J3.7.3 and vm 3.2.2) to registration on order and not registered can buy, and ok that works (have three buttoun on form "register and order" - "checkout as guest" - "cancel"). But when I put captcha to form, it only works for registration on order, checkout as a guest doesn't even check captcha verification.
Is that normal?
If it is, how to change the checkuot as guest button to use captcha too?
Title: Re: Troubles with captcha and registration
Post by: jenkinhill on July 15, 2017, 15:31:56 PM
Normal activity, because the guest checkout does not involve Joomla/VM registration on the site so no captcha is required. If you want to add a captcha then you would have to code a template override to do so, but why put roadblocks in the way of somebody who you want to be able buy a product as quickly and easily as possible?  Almost all the sites I have done with VM only use guest checkout, I disable registration.
Title: Re: Troubles with captcha and registration
Post by: bart1983 on July 15, 2017, 15:49:05 PM
I start thinking in same way :) I thought that would be good (for safety reason), but I have to admit that then could be too much captcha for ordinary buyer.
I know that in overrides edit_address.php, I just want to know what part of code in that file is responsible for captcha veification on that button :) I didn't figure it out yet.
And for now that would be just educational thing, because I actually won't use it anyway :)