Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3398 closed defect (bug) (fixed)

Defining BP_ACTIVITY_SLUG breaks profile pages

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 1.5 Priority: normal
Severity: normal Version: 1.5
Component: Core Keywords: has-patch
Cc:

Description

As noted in the dev chat, defining BP_X_SLUG should still work in BP 1.3.

However, if we define BP_ACTIVITY_SLUG, profile pages break:
example.com/members/USERNAME/

When we define BP_ACTIVITY_SLUG, the current component should in theory still be 'activity', however this changes to whatever we define BP_ACTIVITY_SLUG to be.

One way around this problem is to:

  • set $bp->default_component to bp_get_activity_slug() in the Members loader
  • change bp_is_activity_component() to look for bp_get_activity_slug() as well

I'm not too fond of this approach, but this gets the job done without too much effort.

Attachments (1)

3398.01.patch (3.4 KB) - added by r-a-y 13 years ago.

Download all attachments as: .zip

Change History (4)

@r-a-y
13 years ago

#1 @boonebgorges
13 years ago

  • Milestone changed from Awaiting Review to 1.3

Thanks, r-a-y. bp_is_current_component() is supposed to check against slugs as well as root_slugs, but something got messed up at some point (having to do, I think, with the move from $bp->active_components to the similar $bp->loaded_components). We'll set the default_component to the activity slugs (because in BP, current_component and its ilk come from the URL, ie the slugs), and then mod bp_is_current_component() to check slugs as well.

#2 @boonebgorges
13 years ago

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

(In [4882]) Ensures that bp_is_current_component() checks against slugs as well as rot_slugs. Sets members default component to activity slug rather than to 'activity'. Fixes #3398, props r-a-y

#3 @r-a-y
13 years ago

Thanks for clarifying about bp_is_current_component(), Boone. Makes sense!

Note: See TracTickets for help on using tickets.