Enabled Captcha in GKcontact Plugin and Now cannot access si

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Aug 06, 2013 7:47 am
Reply with quote
Report this post
Hi there, I installed the plugin GKContact and enabled it.

I turned on the Captcha function in the plugin parameters within GKcontact and I get the following error. I cannot access the website at all now, nor can I get into Admin. It gives me this error every time. I am bout to delete the plugin directory for this plugin and hopefully it will at least give me access to the site again.

Code: Select all
Fatal error: Uncaught exception 'Exception' with message 'ReCaptcha plugin needs a public key to be set in its parameters. Please contact a site administrator.' in C:\wamp\www\gkshopbuy\plugins\captcha\recaptcha\recaptcha.php:52 Stack trace: #0 [internal function]: plgCaptchaRecaptcha->onInit('dynamic_recaptc...') #1 C:\wamp\www\gkshopbuy\libraries\joomla\event\event.php(71): call_user_func_array(Array, Array) #2 C:\wamp\www\gkshopbuy\libraries\joomla\event\dispatcher.php(161): JEvent->update(Array) #3 C:\wamp\www\gkshopbuy\plugins\system\plg_gkcontact\plg_gkcontact.php(27): JDispatcher->trigger('onInit', 'dynamic_recaptc...') #4 [internal function]: plgSystemPlg_GKContact->onBeforeRender() #5 C:\wamp\www\gkshopbuy\libraries\joomla\event\event.php(71): call_user_func_array(Array, Array) #6 C:\wamp\www\gkshopbuy\libraries\joomla\event\dispatcher.php(161): JEvent->update(Array) #7 C:\wamp\www\gkshopbuy\libraries\joomla\application\application.php(642): JDispatcher->trigger('onBeforeRender', NULL) #8 C:\wamp\www\gkshopbuy\ad in C:\wamp\www\gkshopbuy\plugins\captcha\recaptcha\recaptcha.php on line 52


Thanks.
User avatar
Gold Boarder

GK User
Tue Aug 06, 2013 7:51 am
Reply with quote
Report this post
Removing the plugin manually by deleting the plugin directory for it didnt work. I assume there is a setting file for it somewhere that would need to be deleted.
:(
User avatar
Gold Boarder

GK User
Tue Aug 06, 2013 8:42 am
Reply with quote
Report this post
Hi,

You have to configure reCAPTCHA in Joomla settings before activating it in the plugin.
User avatar
Administrator

GK User
Tue Aug 06, 2013 9:16 am
Reply with quote
Report this post
dziudek wrote:Hi,

You have to configure reCAPTCHA in Joomla settings before activating it in the plugin.


OK I didnt know that but the thing is I cannot get into Joomla due to this now. So what do I do now?
User avatar
Gold Boarder

GK User
Tue Aug 06, 2013 9:33 am
Reply with quote
Report this post
So I can't get into Jooma admin, cannot load the site at all. I am stuck. I'd assume I could only access the files to edit inside but I wouldnt know where to start to disable the captcha or enable it in the global config.

Please help, thanks.
User avatar
Gold Boarder

GK User
Tue Aug 06, 2013 9:42 am
Reply with quote
Report this post
In the plugin file please comment out the following fragments:

Code: Select all
if($this->params->get('use_recaptcha') == 1) {
         JPluginHelper::importPlugin('captcha');
         $dispatcher = JDispatcher::getInstance();
         $dispatcher->trigger('onInit','dynamic_recaptcha_1');
      }   


Code: Select all
// if reCaptcha is enabled
         if($this->params->get('use_recaptcha') == 1) {
            JPluginHelper::importPlugin('captcha');
            $dispatcher = JDispatcher::getInstance();
            $res = $dispatcher->trigger('onCheckAnswer', $post['recaptcha_response_field']);
            
            if(!$res[0]){
                $app->redirect($post['return'],JText::_('PLG_GKCONTACT_RECAPTCHA_ERROR'),"error");
            }
         }
         // check the token
         JSession::checkToken() or die( 'Invalid Token' );
         // if the reCaptcha and token are correct - check the mail data:
User avatar
Administrator

GK User
Thu Aug 08, 2013 12:28 pm
Reply with quote
Report this post
Thanks for that but I did it another way. I deleted the dir and then logged in and disabled the plugin. And then went in and turned off recaptcha and copied the dir back into it.
User avatar
Gold Boarder