Skip to:

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#4177 closed defect (bug) (fixed)

BP 1.5.x - Issue with bp_loggedin_user_domain() in activity directory template

Reported by: cwidesigns's profile cwidesigns Owned by:
Milestone: 1.6 Priority: normal
Severity: minor Version: 1.5.5
Component: Templates Keywords: has-patch
Cc: webmasters@…


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. 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, then the link's URL becomes and generates a Page Not Found error.

Suggested fall back:

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 : "" );

Attachments (2)

4177-1.5-branch.01.patch (866 bytes) - added by r-a-y 12 years ago.
4177-1.6-bleeding.01.patch (1005 bytes) - added by r-a-y 12 years ago.

Download all attachments as: .zip

Change History (14)

#1 @r-a-y
12 years ago

Hi cwidesigns,

You should only be using bp_loggedin_user_domain() when you have confirmed that a user is logged in. That way, you won't run into the issue you explained above.

Version 0, edited 12 years ago by r-a-y (next)

#2 @r-a-y
12 years ago

  • Component changed from Members to Theme
  • Keywords dev-feedback added; has-patch needs-testing removed
  • Summary changed from Issue with bp_loggedin_user_domain() function returning "" to BP 1.5.x - Issue with bp_loggedin_user_domain() in activity directory template

#3 @boonebgorges
12 years ago

r-a-y - Sure, feel free to send a patch.

#4 @DJPaul
12 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 1.5.6

#5 @r-a-y
12 years ago

  • Keywords has-patch added
  • Severity changed from normal to minor

#6 @DJPaul
12 years ago

  • Owner Me? deleted
  • Status changed from new to assigned

#7 @cwidesigns
12 years ago

Hey guys, thanks for addressing this, I got busy. My suggestion was a quick one, I didn't review the code to any real degree. I'm changing my username to omarfitzpatrick and hope to get more involved in buddypress patches, features etc. Cheers.

#8 @DJPaul
12 years ago

I think we should avoid theme changes in a 1.5.x release. We have some changes to BP-Default in 1.6, so we should include this in 1.6 too. Bump to 1.6 milestone?

#9 @boonebgorges
12 years ago

DJPaul - Normally, I'd agree with not touching the theme for a bugfix release. But the issue described here is a flat out bug: we should be using root_slug here, or it will totally break on installations with non-standard page slugs. There are no backpat issues; custom themes or child themes that override this file will continue to have a broken link (no further regression), while others will get the fix.

#10 @DJPaul
12 years ago

  • Milestone changed from 1.5.6 to 1.6

This missed the 1.5.6 boat

#11 @djpaul
12 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6081]) Correct activity directory permalink in BP-Default. Fixes #4177, props r-a-y

#12 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.