VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: PRO on June 24, 2026, 20:19:56 PM

Title: recaptcha wasnt rendering
Post by: PRO on June 24, 2026, 20:19:56 PM
Captcha field was failing to render , was wrapped in editor html, the onInit, and onDisplay was causing this.

shopfunctionsF


comment these out
            //   $app = JFactory::getApplication();
            //   $results = $app->triggerEvent('onInit', [$id]);
            //   $output  = $app->triggerEvent('onDisplay', [$reCaptchaName, $id, 'g-recaptcha required']);



and added
   $captcha = \Joomla\CMS\Captcha\Captcha::getInstance($reCaptchaName);
    $output = [$captcha->display($id, $id, 'g-recaptcha required')];



so fixed as so

   } else {
            //   $app = JFactory::getApplication();
            //   $results = $app->triggerEvent('onInit', [$id]);
            //   $output  = $app->triggerEvent('onDisplay', [$reCaptchaName, $id, 'g-recaptcha required']);
            $captcha = \Joomla\CMS\Captcha\Captcha::getInstance($reCaptchaName);
    $output = [$captcha->display($id, $id, 'g-recaptcha required')];
            }


Title: Re: recaptcha wasnt rendering
Post by: jflash on June 26, 2026, 10:26:57 AM
And which Captcha solution will work with this code change?
Title: Re: recaptcha wasnt rendering
Post by: PRO on June 29, 2026, 18:44:34 PM
neew joomla does not come with native captcha

Most download a 3rd party one,
like so
https://github.com/SharkyKZ/joomla-recaptcha-v3-plugin