I am having an issue with the reCaptcha trying to re-declare its class through K2 during new user registration through JFBConnect. It's weird because this was working fine not too long ago. :/
I get the following error:
Notice: Constant RECAPTCHA_API_SERVER already defined in /var/www/osl/administrator/components/com_k2/lib/recaptchalib.php on line 49
Notice: Constant RECAPTCHA_API_SECURE_SERVER already defined in /var/www/osl/administrator/components/com_k2/lib/recaptchalib.php on line 50
Notice: Constant RECAPTCHA_VERIFY_SERVER already defined in /var/www/osl/administrator/components/com_k2/lib/recaptchalib.php on line 51
Fatal error: Cannot redeclare class ReCaptchaResponse in /var/www/osl/administrator/components/com_k2/lib/recaptchalib.php on line 148
Here are lines 49, 50, 51, & 148 on the php file:
47 * The reCAPTCHA server URL's
48 */
49 define("RECAPTCHA_API_SERVER", "
www.google.com/recaptcha/api");
50 define("RECAPTCHA_API_SECURE_SERVER", "
www.google.com/recaptcha/api");
51 define("RECAPTCHA_VERIFY_SERVER", "
www.google.com");
148 class ReCaptchaResponse {
149 var $is_valid;
150 var $error;
151 }
I'm using J 3.3.0 | Jomsocial 3.2.0.5 | JFBConnect 6.0.6 (System is 6.0.4) | SCLogin 4.0.6
Automatic Registration is OFF.
K2 settings with Joomla should be as follows:
- Goto Joomla Admin > Plug-in Manager > Captcha - ReCaptcha and enter your Keys and ENABLE Plug-in.
- Goto Joomla Admin > Global Configuration > Default Captcha and set it to use "Captcha - ReCaptcha".
- Goto Joomla Admin > Components > K2 > Parameters > Comments > Anti-spam protection and set it to use "Google reCaptcha" (or Both), plus ENABLE "reCaptcha for registered users".
- Goto Joomla Admin > Components > K2 > Parameters > Advanced > down to "Anti-spam Settings" and enter your Keys again, plus set "Enable reCaptcha on registration form" to YES.
A conflict with the default reCaptcha in Joomla vs. K2. The answer to get it to work is this ...
- Goto Joomla Admin > User Manager > Options (button) > Captcha and set it to use "NONE". This will turn-off the default user registration reCaptcha loading in the background behind K2 and causing the conflict.
I've disabled several plugins and tested after clearing server and browser caches. I've done the following:
Disabled - JCH Optimize Pro plugin
Disabled - NoNumber CDN for Joomla plugin
Disabled - Captcha reCaptcha plugin
Disabled - K2 Social Profiles plugin
Disabled - System Cache
After doing the above it still returns the same errors. Could the ordering of the plugins be causing this issue?
I am at a loss.