Opened 15 years ago
Closed 15 years ago
#903 closed defect (bug) (fixed)
user anv gets wrong path for visitors in trunk
Reported by: | mariusooms | Owned by: | |
---|---|---|---|
Milestone: | 1.1 | Priority: | major |
Severity: | Version: | ||
Component: | Keywords: | navigation | |
Cc: |
Change History (6)
#2
@
15 years ago
Unless I'm wrong, I'm not sure how that fix works... The code around line 83 is...
if ( $bp->loggedin_user->domain ) $link = str_replace( $bp->loggedin_user->domain, $bp->displayed_user->domain, $user_nav_item['link'] ); else $link = $user_nav_item['link'];
So your fix is including an empty loggedin_user->domain... Unless we're on different branches of the trunk somehow?
#3
@
15 years ago
No....not an empty loggedin_user->domain...I'm including the displayed_user->domain so that the path gets set correctly when the user is not a loggedin_user->domain as per the condition. So the complete conditional would be:
if ( $bp->loggedin_user->domain ) $link = str_replace( $bp->loggedin_user->domain, $bp->displayed_user->domain, $user_nav_item['link'] ); else $link = $bp->displayed_user->domain . $user_nav_item['link'];
So you see...the user_nav_itemlink? by itself if the viewing user is not logged in does not suffice for the complete path. The displayed_user->domain makes sure the path is consistent for all paths and tags on the user_nav_item.
Sorry for the code mess up, line 83 bp-core-templatetags.php:
change to: