[buddypress-trac] [BuddyPress] #4177: Issue with bp_loggedin_user_domain() function returning ""
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun Apr 29 23:56:51 UTC 2012
#4177: Issue with bp_loggedin_user_domain() function returning ""
--------------------------+-------------------------------------
Reporter: cwidesigns | Owner: Me?
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Members | Version: 1.5.5
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------
File Affected: wp-content\plugins\buddypress\bp-themes\bp-
default\activity\index.php
File (to be) Fixed: wp-content\plugins\buddypress\bp-members\bp-members-
template.php
Bug Description: The bp_loggedin_user_domain() fucntion appears to return
a value used as a prefix to a "slug" in order to create a complete URL.
If the bp_loggedin_user_domain() function returns "", then the current URL
(E.g. http://www.example.com/activity/) is used and the slug (in this case
the "activity") is tagged onto the end of it. The issue is that if you
are already viewing the Activities page for example at
http://www.example.com/activity/, then the link's URL becomes
http://www.example.com/activity/activity/ and generates a Page Not Found
error.
Suggested fall back:
bp-members-template.php
line: 888
function bp_loggedin_user_domain() {
global $bp;
-- return apply_filters( 'bp_loggedin_user_domain', isset(
$bp->loggedin_user->domain ) ? $bp->loggedin_user->domain : home_url() .
"/" );
}
function bp_loggedin_user_domain() {
global $bp;
++ return apply_filters( 'bp_loggedin_user_domain', isset(
$bp->loggedin_user->domain ) ? $bp->loggedin_user->domain : "" );
}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4177>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list