Post by santura » Tue Jun 28, 2016 12:01 pm

I am getting the following error (seen in firebug) on all pages with recaptchas on them.

Error: ReCAPTCHA placeholder element must be empty

Though the pages still function, other js functionality doesn't work. For example - when I empty the cart via the cart button in the header, the cart empties but the details on the button don't update.

Anyone else seen this?

You can see the error at http://barbaramclennan.com/index.php?ro ... on/contact
Last edited by santura on Tue Jul 05, 2016 2:44 pm, edited 1 time in total.

New member

Posts

Joined
Fri Jun 14, 2013 8:33 pm

Post by moused72 » Wed Jun 29, 2016 3:49 pm

Hi
Google reCaptcha work perfect on your site

18 extra positions FREE, Unlimit style color for default theme FREE, Vietnamese Language, vietxuangas.com.vn


Active Member

Posts

Joined
Mon Feb 15, 2016 9:46 am

Post by santura » Fri Jul 01, 2016 12:46 pm

As I said, the recaptcha works but it throws the error anyway and other functionality doesn't work.
Screenshot_12.jpg

Screenshot_12.jpg (55.68 KiB) Viewed 4638 times


New member

Posts

Joined
Fri Jun 14, 2013 8:33 pm

Post by straightlight » Fri Jul 01, 2016 8:08 pm

Which OC version are you using?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by santura » Mon Jul 04, 2016 9:03 pm

2.0.2.0

New member

Posts

Joined
Fri Jun 14, 2013 8:33 pm

Post by straightlight » Mon Jul 04, 2016 9:35 pm

According to this link: http://stackoverflow.com/questions/2757 ... lid-inputs ,

changing the following in your catalog/view/theme/<your_theme>/template/captcha/google_captcha.tpl file:

Code: Select all

<script src="//www.google.com/recaptcha/api.js" type="text/javascript"></script>
into:

Code: Select all

<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
Then, at the bottom - to add:

Code: Select all

<script text="text/javascript"><!--
grecaptcha.reset();
//--></script>
would solved the problem. However, another one from this link: https://groups.google.com/forum/#!topic ... UTgPoIKhOk indicates that adding a closing tag to the DIV key would solved the problem like this on the same file:

Code: Select all

<div id="input-payment-captcha" class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
into:

Code: Select all

<div id="input-payment-captcha" class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>" /></div>
but I did not tested these.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by santura » Tue Jul 05, 2016 2:29 pm

I don't have that file. It seems to be done differently in my version 2.0.2.0

I did just notice in the header on my contact page, that the recaptcha script is called twice. Maybe this is the issue.

Don't quite know how to fix this though.

New member

Posts

Joined
Fri Jun 14, 2013 8:33 pm

Post by santura » Tue Jul 05, 2016 2:31 pm

I guess the duplicated script is not the issue, as I get the same error on the register page and the script is only called once there

New member

Posts

Joined
Fri Jun 14, 2013 8:33 pm

Post by santura » Tue Jul 05, 2016 2:44 pm

Actually it was the issue, I had the script added in header.tpl probably my mistake. I took it out and the error has disappeared.

New member

Posts

Joined
Fri Jun 14, 2013 8:33 pm
Who is online

Users browsing this forum: Mike Guenther and 240 guests