#3398 closed defect (bug) (fixed)
Defining BP_ACTIVITY_SLUG breaks profile pages
Reported by: | 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)
Note: See
TracTickets for help on using
tickets.
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.