Fatal error: Cannot redeclare class FacebookRestClientException in /xxxxxxx/httpdocs/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php on line 2690
sourcecoast wrote: The new error your describing below is caused when you're using other Facebook extensions on your site that use the Facebook php library. This can be from JomSocial or 'fan'-type modules.
The next version of JFBConnect will properly check if the library's already been instantiated and not throw the error like it is there. If you'd like to add the check yourself for now, you can try the following:
In the /components/helpers/facebookhelper.php file, around line 136, add the following bold statement:
if (!class_exists('FacebookRestClient'))
include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'assets'.DS.'facebook-api'.DS.'facebook.php');
132 if (self::$_FbRoot->user)
133 { # There's a FB user logged in
134 # check if user is logged into Joomla.
135 # If not, either:
136 if (!class_exists('FacebookRestClient'))
137 include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'assets'.DS.'facebook-api'.DS.'facebook.php');
138 # 1) Check if they have a mapped Joomla account, and log that user in
139 # 2) If not, set their fb uid to 0, even if they have a session
140 #echo "FBHelper: FB user logged in : ".self::$_FbRoot->user;
141 $jUser =& JFactory::getUser();
142 if ($jUser->guest)
Korpio wrote: Hi, I opened httpdocs/components/com_jfbconnect/helpers/facebookhelper.php
And added the two lines you told on line 136, and it looks like this:
132 if (self::$_FbRoot->user) 133 { # There's a FB user logged in 134 # check if user is logged into Joomla. 135 # If not, either: 136 if (!class_exists('FacebookRestClient')) 137 include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'assets'.DS.'facebook-api'.DS.'facebook.php'); 138 # 1) Check if they have a mapped Joomla account, and log that user in 139 # 2) If not, set their fb uid to 0, even if they have a session 140 #echo "FBHelper: FB user logged in : ".self::$_FbRoot->user; 141 $jUser =& JFactory::getUser(); 142 if ($jUser->guest)
But I got the same error <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt="" title="Crying or Very Sad" /><!-- s:cry: -->
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.