VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: barbara on December 15, 2020, 03:28:36 AM

Title: Invisible reCAPTCHA on registration form
Post by: barbara on December 15, 2020, 03:28:36 AM
Hi

I am trying to find a wa y to get the  Invisible reCAPTCHA working on the VM registration form

I found an old thread marked solved, but as far as I could tell there was no actual solution posted

can this be done?

any help would be greatly appreciated
Title: Re: Invisible reCAPTCHA on registration form
Post by: jenkinhill on December 15, 2020, 10:26:11 AM
I works just fine in VM 3.8.6 - if not using that version you need to upgrade. Ensure that the Joomla CAPTCHA - Invisible reCAPTCHA plugin is correctly configured and enabled.  Turn on ReCaptcha for registration in configuration/Shop and check if using template overrides that the ReCaptcha display code is present.
Title: Re: Invisible reCAPTCHA on registration form
Post by: barbara on December 16, 2020, 22:12:25 PM
the invisible recaptcha is working on the joomla / breezing forms forms, so the recaptcha appears to be working - just not VM,

using J 3.9.23 / vm 3.8.6

Use ReCaptcha for Registration - checked

still get error
'Message
Empty solution not allowed.'

which seems like the vm registration page is looking for the old style checkbox recaptcha?
Title: Re: Invisible reCAPTCHA on registration form
Post by: barbara on December 16, 2020, 22:20:49 PM
I disabled the redirect and tried to submit the joomla registration form - no problem

the issue is def. with the vm registration form


which is the actual file that includes the recaptcha code in the registration process?

I`m wondering if there is an old overwrite in place, but I dont know which file to check
Title: Re: Invisible reCAPTCHA on registration form
Post by: GJC Web Design on December 16, 2020, 22:27:14 PM
components\com_virtuemart\views\user\tmpl\edit.php

echo $this->captcha;
Title: Re: Invisible reCAPTCHA on registration form
Post by: barbara on December 17, 2020, 00:59:15 AM
I have 2 pages

which have a section including:

echo $this->captcha;

components\com_virtuemart\views\user\tmpl\edit.php
components\com_virtuemart\views\user\tmpl\edit_address.php

Seems to be the edit_address page which is loading when I click edit billing/shipping on the cart page, ( it has the COM_VIRTUEMART_USER_FORM_CAPTCHA  language part which the edit.php does not)
The edit.php file loads when the register button is directly clicked

both of the files have the [echo $this->captcha;]  code

*note with the invisible captcha usually a little icon loads on eg the bottom right of the screen - this happens with the joomla registration & breezing forms forms, but no icon loads on the vm registration page

on some older threads I saw a reference to 'editaddresscartBT'' being an issue with captcha

looking in my developer tools I see a warning under sources  'editaddresscartBT''

[DOM] Found 2 elements with non-unique id #modlgn-passwd: (More info: https://goo.gl/9p2vKq) %o

but I cant seem to find a file called  'editaddresscartBT'' ?!


Title: Re: Invisible reCAPTCHA on registration form
Post by: jenkinhill on December 17, 2020, 11:17:14 AM
There is no "editaddresscartBT" file - it is used to refer to the billing address.

The captcha code is included in components/com_virtuemart/views/user/tmpl/edit_address.php


// captcha addition
if(VmConfig::get ('reg_captcha') && JFactory::getUser()->guest == 1){
?>
<fieldset id="recaptcha_wrapper">
<?php if(!VmConfig::get ('oncheckout_only_registered')) { ?>
<span class="userfields_info"><?php echo vmText::('COM_VIRTUEMART_USER_FORM_CAPTCHA'); ?></span>
<?php ?>
<?php echo $this->captcha?>
</fieldset><?php }
// end of captcha addition


If using an override  for that file make sure it contains the ReCaptcha code.

Title: Re: Invisible reCAPTCHA on registration form
Post by: citylop on March 15, 2021, 22:49:38 PM
Hello, I am using J3.9.25 and VirtueMart 3.8.8 10472.
Invisible Recaptcha is set all across the site and it is working fine, at least it was until recently, when unfortunately I discovered that I can no longer register to virtuemart because I get the message "Empty solution not allowed."

Recaptcha plugin set in 1) Virtuemart configuration, 2) in J plugin, 3) in global configurations and 4) users options

I checked the files mentioned above and everything seems OK, I also do not have a folder under my template/html for virtuemart so I believe that there is no override for this.

Any advice welcome.

Thanks in advance
BR
Title: Re: Invisible reCAPTCHA on registration form
Post by: citylop on March 18, 2021, 17:31:40 PM
Friendly bump!
Title: Re: Invisible reCAPTCHA on registration form
Post by: jenkinhill on March 19, 2021, 11:41:03 AM
No idea!  Works fine for me on a test site with same versions as you using default VM templates on VMBeez.

I assume you only have the CAPTCHA - Invisible reCAPTCHA plugin enabled and not both reCAPTCHA plugins?
Title: Re: Invisible reCAPTCHA on registration form
Post by: citylop on March 20, 2021, 03:09:22 AM
Hello Jenkin and thanks for your answer!

Yes I only have invisible recaptcha enabled which works fine in contact form but not in virtuemart registration page.

Could it be a template issue? Is there a thing I should check before anything else?
Title: Re: Invisible reCAPTCHA on registration form
Post by: jenkinhill on March 20, 2021, 11:55:35 AM
The first diagnostic test for an error like you describe is to check using (preferably) the VMBeez template (included in the VM packages, such as com_virtuemart.3.8.9.10473_package_or_extract.zip). Alternative try Protostar or Beez. These should use the default VM templates.