Wednesday, December 16, 2009

Info tab is not working in Social Engine 4

Member Info tab is not working in Social Engine 4


I was working fix bugs in social engine 4. There were lot of bugs, but the one bug was very strange.  When any user logon and see own profile by clicking on “My Profile” link.
A sub menu tab is show with “Updated”, “Notes”, “My Contacts Groups” etc.
The sub menu tab “Updated”, “Notes”, “My Contacts Groups” are working but after the rest all sub tabs for ex: “Info”, “Contacts”, “Albums” and in “More+” dropdown tabs links were  not working.  The same problem was occurring when any logged in user see his/her friend’s or other user’s profile, that’s information were not coming.


Info tab is not working in Social Engine 4
Info tab is not working in Social Engine 4




















I have solved it. If you are facing the same problem then make the listed below changes:

1) Open the file   container-tabs's Controller.php file

2) Goto line number 56 and search the listed below code:
$childrenContent .= $child->render() . PHP_EOL;  

3) Make it comment:
//$childrenContent .= $child->render() . PHP_EOL;

4) and paste listed below code:

 if($child->getIdentity()=="945") {
            $cntDivStart=count(explode("<div", $child->render()))-1;
            $cntDivEnd=count(explode("</div", $child->render()))-1;
            if($cntDivEnd<$cntDivStart) {
                        $childrenContent .= $child->render() ."</div>". PHP_EOL;
            } else  {
                        $childrenContent .= $child->render() . PHP_EOL; 
            }
} else {
            $childrenContent .= $child->render() . PHP_EOL;
}

No comments:

Post a Comment