× Joomla Facebook Connect support forum

Topic-icon After upgrade 4.0.1, clicking on 'Profiles' tab causes error

Active Subscriptions:

None
The error is:
Fatal error: Call to undefined method CommunityModelProfile::getProfileTypes() in /public_html/plugins/jfbcprofiles/jomsocial.php on line 449

Fatal error: spl_autoload() [function.spl-autoload]: Class JFactory could not be loaded in /public_html/libraries/joomla/session/storage/database.php on line 84

The social plugins were also updated.
The topic has been locked.
Active Subscriptions:

None
I've realized this may be an incompatibility with earlier versions of JomSocial that didn't use the "profile type". The version being used on the site is 1.8 and unfortunately upgrading is not currently an option. Any ideas?
The topic has been locked.
Support Specialist
Hey Matt,
Sorry for the troubles. That's a 'problem' we introduced shortly after 3.4 with an update to the JomSocial plugin that added support of multi-profiles in JomSocial 2.0+. I believe to fix it (at least for quick testing), can you try the following code change.

In the following file /plugins/jfbcprofiles/jomsocial.php, at line 449, in the function getProfileTypes, you'll see the following line:
$profileTypes = $profileModel->getProfileTypes();
Change it to:
$profileTypes = null
Make sure you set the Profile Types to not show during registration in the Profiles configuration, as that obviously won't work. And please test. This should do it, but not something we've tested extensively. After implementing multi-profiles, we realized it would break 1.8 or less, but really didn't hear many gripes.. but will likely put a check in a future release to not be so fatal of an error.

Good luck,
Alex
The topic has been locked.
Active Subscriptions:

None
Thanks Alex, that worked - though it's throwing other errors related to it, but you can now see the page.
The topic has been locked.
Support Specialist
Yeah, figured it may cause some problems, but would get you over any Fatal Error blues in the short term. Didn't have the code directly in front of me at the time. If it's a PHP warning about something not being an array, you can try updating "null" to "array();":
$profileTypes = array();
Looking at it, I think that's the better way to do it. However, if you're seeing something else, let us know... we hate warnings and anything else PHP can spit out, so we'll help you fix it.. and it will help us get it ready to have in the next release anyways.

We'll investigate this in the next day or so to see if we can figure out the best way to support JomSocial 1.8 and below, and let you know what we find.. but if you run into other problems related to this, or anything else, in the meantime, just let us know.

Alex
The topic has been locked.