Joomla Community Builder "cb.core" foreach bug fix
In the Joomla! CMS (which this site is not run on, incidentally, but I use at Flash Game Post), I was having trouble with the Community Builder component throwing an error. It's a simple fix to get around it in version 1.1 (currently, they have 1.2 RC4, but I don't have time to test software this month.)
Problem:
In Joomla 1.5, using Community Builder 1.1, when going into a user's profile page, this error was thrown:
Warning: Invalid argument supplied for foreach() in /components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php on line 240
This Worked!:
This is a known bug in v1.1, so here's the known fix for it, presented in just one more place in case Google helps you come and visit me instead of someone else! :)
- Open the file ./components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php with your favorite code editor. Change line 528 from this:
$params =& $juser->getParameters();To this:
$params =& $juser->getParameters(true);
(yes, just add the word "true" in parenthesis.) - Delete line #529, which is this:
$params->loadSetupFile(JApplicationHelper::getPath( 'com_xml', 'com_users' ));
Tada! All fixed up... well, you need to save that file and re-upload it to the server, of course. You knew that, though... right?
Cheers.