1

I have a problem with captcha on my website. When I want to ask question about product, captcha is not showing and after asking it writes message "Code is not valid". I've been searching for solution for last 2 days and I found nothing that helped me.

My website: URL

website is in czech language, so you are looking for button "zeptejte se na produkt" (orange button right under 2-3 Days image)

Thanks for any help.

  • I see a div which seems exists as a placholder for reCaptcha, but I also see a js error in your page pertaining the reCaptcha - Error: ReCAPTCHA placeholder element must be an element or id. So try to fix this at first. – FFrewin Feb 7 '17 at 13:08
1

Ok, problem solved. In file /plugins/captcha/recaptcha/recaptcha.php replace these lines (62 - 68):

$document = JFactory::getDocument();
$theme   = $this->params->get('theme', 'clean');
$document->addScriptDeclaration('jQuery(document).ready(function($){$(window).load(function() {'
. 'grecaptcha.render("' . $id . '", {sitekey: "' . $pubkey . '", theme: "' . $theme . '"});'
. '});});'
);

with this single line:

JHtml::_('script', 'plg_captcha_recaptcha/recaptcha.min.js', false, true);

Note: I modified this file after updating joomla (because of similar problem - it solved the problem), but after updating virtuemart a few months later, my "patch" (not mine, I had found it somewhere on forum) stopped working. So I undone changes (by replacing these lines) and it started to work again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.