Author Topic: Joomla 3.5 the captcha is no more visible  (Read 11246 times)

patbe60

  • Beginner
  • *
  • Posts: 43
Joomla 3.5 the captcha is no more visible
« on: March 22, 2016, 13:31:46 pm »
After upgrading to Joomla 3.5 the captcha is no more visible in both, user registration and ask a question.

VM 3.0.14
J 3.5.0

mirrorsandglass

  • Jr. Member
  • **
  • Posts: 165
  • Time Is Precious, Waste It Wisely
Re: Joomla 3.5 the captcha is no more visible
« Reply #1 on: March 23, 2016, 17:34:05 pm »
Confirm this is happening on mine too same versions.
The recaptcha div is not populated.
<div id="dynamic_recaptcha_1"></div>

EDIT: If I set version to 1.0 in the plugin settings it works so obvoiusly a Version 2.0 problem.

mirrorsandglass

  • Jr. Member
  • **
  • Posts: 165
  • Time Is Precious, Waste It Wisely
Re: Joomla 3.5 the captcha is no more visible
« Reply #2 on: March 23, 2016, 17:56:13 pm »
It works if I comment out line 63 and add the following to the else for the version check at line 61. in [ROOT]/plugins/captcha/recaptcha/recaptcha.php :
Code: [Select]
$file = 'https://www.google.com/recaptcha/api.js?onload=JoomlaInitReCaptcha2&render=explicit&hl=' . JFactory::getLanguage()->getTag();
JHtml::_('script', $file);
//JHtml::_('script', 'plg_captcha_recaptcha/recaptcha.min.js', false, true);

$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 . '"});'
. '});});'
);
I assume it isn't finding plg_captcha_recaptcha/recaptcha.min.js possibly due to a wrong path?

franayala

  • Jr. Member
  • **
  • Posts: 67
Re: Joomla 3.5 the captcha is no more visible
« Reply #3 on: March 24, 2016, 12:02:28 pm »
Hi mirrorsandglass,

Works for me, but only for askaquestion, not for virtuemart registration...

Works for both things in your sites?

Thanks!
www.cuidadicos.es - Natural suplements and beauty

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27598
  • Always on vacation
    • Jenkin Hill Internet
Re: Joomla 3.5 the captcha is no more visible
« Reply #4 on: March 24, 2016, 12:10:15 pm »
Reports of Captcha problems elsewhere for other extensions. Seems the Joomla devs have not made the new version 2 backwards compatible.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

franayala

  • Jr. Member
  • **
  • Posts: 67
Re: Joomla 3.5 the captcha is no more visible
« Reply #5 on: March 25, 2016, 03:42:26 am »
Back to Joomla 3.4.8 and Recaptcha not work in registration page (1.0 or 2.0).

I try with protostar and same thing...
www.cuidadicos.es - Natural suplements and beauty

mirrorsandglass

  • Jr. Member
  • **
  • Posts: 165
  • Time Is Precious, Waste It Wisely
Re: Joomla 3.5 the captcha is no more visible
« Reply #6 on: March 29, 2016, 16:50:31 pm »
Hi mirrorsandglass,

Works for me, but only for askaquestion, not for virtuemart registration...

Works for both things in your sites?

Thanks!
Hi franayala,
Yes it works for me in both askaquestion and registration.
Sorry for the obvious but make sure you have the tick box checked in Configuration/Configuration/Shop

franayala

  • Jr. Member
  • **
  • Posts: 67
Re: Joomla 3.5 the captcha is no more visible
« Reply #7 on: March 30, 2016, 13:14:07 pm »
Hi mirrorsandglass!

No worries. ;)

This option is checked, but not works for me :(

Any idea?

Thanks a lot!!
www.cuidadicos.es - Natural suplements and beauty

mirrorsandglass

  • Jr. Member
  • **
  • Posts: 165
  • Time Is Precious, Waste It Wisely
Re: Joomla 3.5 the captcha is no more visible
« Reply #8 on: March 30, 2016, 16:30:46 pm »
Hi franayala,
Only other things I can think of causing this problem for registration are your template, another plugin or a script conflict.
Without knowing your site it would be impossible to tell.

Try without template overrides or using just the default template.
If you have any other plugins that are used during registration try de-activating them one at a time, if you can, and see if that solves the problem.
Firebug in Firefox is great for spotting script conflicts.

Sorry I can't be more help.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27598
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

aha

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Joomla 3.5 the captcha is no more visible
« Reply #10 on: April 02, 2016, 05:55:17 am »
Confirm this is happening on mine too same versions.
The recaptcha div is not populated.
<div id="dynamic_recaptcha_1"></div>

EDIT: If I set version to 1.0 in the plugin settings it works so obvoiusly a Version 2.0 problem.

If select the version of 1, and then somehow it works
I loaded the old file (/plugins/captcha/recaptcha/recaptcha.php), also worked in version 2.0 but with some flaws

aha

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Joomla 3.5 the captcha is no more visible
« Reply #11 on: April 02, 2016, 06:18:52 am »
It works if I comment out line 63 and add the following to the else for the version check at line 61. in [ROOT]/plugins/captcha/recaptcha/recaptcha.php :
Code: [Select]
$file = 'https://www.google.com/recaptcha/api.js?onload=JoomlaInitReCaptcha2&render=explicit&hl=' . JFactory::getLanguage()->getTag();
JHtml::_('script', $file);
//JHtml::_('script', 'plg_captcha_recaptcha/recaptcha.min.js', false, true);

$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 . '"});'
. '});});'
);
I assume it isn't finding plg_captcha_recaptcha/recaptcha.min.js possibly due to a wrong path?

Thank you.
It helped for registration form

biltong

  • Jr. Member
  • **
  • Posts: 125
    • Starfish Websites
Re: Joomla 3.5 the captcha is no more visible
« Reply #12 on: April 06, 2016, 15:09:09 pm »
Joomla 3.5.1 has no mention of Captcha fixes.

Just tested my installation again with J3.5.1 and VM 3.0.14 on Firefox 45.0.1 with these results:

Does not show on VM 'Recommend to a friend' and 'Ask a Question' even with Beez template. When you click Submit, it displays 'The CAPTCHA solution was incorrect.'
      
Does however show and work on VM Cart / Checkout page when clicking on the Forgot Password and Forgot Username links.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27598
  • Always on vacation
    • Jenkin Hill Internet
Re: Joomla 3.5 the captcha is no more visible
« Reply #13 on: April 06, 2016, 15:15:23 pm »
The fix for /plugins/captcha/recaptcha/recaptcha.php enables Recaptha to work on VM and also on at least one other component that had the same problem.

Maybe easier to understand the code change here:
http://forum.joomla.org/viewtopic.php?f=710&t=874688&start=30#p3385872
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

stAn99

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 85
    • One Page Checkout for Virtuemart 2
Re: Joomla 3.5 the captcha is no more visible
« Reply #14 on: April 06, 2016, 15:22:46 pm »
this forum post got the same problem:
http://www.vi-solutions.de/en/forum-index/19-joomla-extension-visforms/899-graphic-error-with-captcha-recaptcha-2-0

and the solution seems to be more elegant:

Code: [Select]
$captcha = JCaptcha::getInstance('recaptcha');
$html = $captcha->display(null, 'dynamic_recaptcha_1', 'required');

maybe wrapped with a few checks would work even better:

Code: [Select]
if (class_exists('JCaptcha') && (method_exists('JCaptcha', 'getInstance')))
   {
   $captcha = JCaptcha::getInstance('recaptcha');
   if (method_exists($captcha, 'display'))
   {
   $html_captcha = $captcha->display(null, 'dynamic_recaptcha_1', 'required');
   }
   }

best regards, stan
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart