Hi all,
For the past few days, we are trying to fix an issue between CB and AceSEF. The problem is that, with AceSEF, somehow the user profile link (menu item (user profile), CB Online module, list) of the user currently logged on is pointing to some random CB URL.
Example:
I logged in as User 2. At the same time, User 1 and 3 are also logged in. All links pertaining to my user (User 2) in the User Profile menu item, CB Online and User List are all pointing to the wrong URL. Link to User 1 and User 3 profile are working properly. If I logged in as User 3, all links to User 3 profile are again pointing to the wrong URL. Link to User 1 and 2 are working properly.
The issue mentioned above can be observed if AceSEF for Community Builder is active. If we disable AceSEF for Community Builder, everything works properly.
After a few days of testing, debugging and code tracing, we found out that the userProfileUrl function assigns a null value to the userid if the id is equal to the current logged in user. I think, somehow, AceSEF is not able to catch that null userid is equal to the current logged in user, thus giving a wrong URL.
In order to correct the current issue, we decided to comment out line 2870 of administrator/components/com_comprofiler/plugin.foundation.php
Code:
function userProfileUrl( $userId = null, $htmlSpecials = true, $tab = null, $format = 'html' ) {
if ( $userId && ( $userId == $this->myId() ) ) {
/*$userId = null;*/
}
return $this->cbSef( 'index.php?option=com_comprofiler' . ( $userId ? '&task=userprofile&user=' . (int) $userId : '' ) . ( $tab ? '&tab=' . urlencode( $tab ) : '' ) . getCBprofileItemid( false ), $htmlSpecials, $format );
}
Doing so solved our current issue. The question now is, what's the reason for assigning null value if it's the same as the current user? will there be any issue to other area/function if we comment this line out? So far, we haven't encountered any error...yet. But just wanted to be sure that it is ok to comment it out.
Thanks