Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#5039 closed defect (bug) (fixed)

Profile subnav not displayed

Reported by: r-a-y's profile r-a-y Owned by: boonebgorges's profile boonebgorges
Milestone: 1.8 Priority: normal
Severity: normal Version: 1.2
Component: Templates Keywords: has-patch commit
Cc:

Description

The profile subnav tab is not displayed unless you are viewing your own profile.

In the case of plugin devs adding a subnav item under the "Profile" tab, this is quite restricting.

Attached patch removes the bp_is_my_profile() restriction in the profile template. It should be safe as the "Edit" and "Change Avatar" subnav items have the appropriate user_has_access flags set.

Attachments (1)

5039.01.patch (1.4 KB) - added by r-a-y 11 years ago.

Download all attachments as: .zip

Change History (7)

@r-a-y
11 years ago

#1 @r-a-y
11 years ago

  • Component changed from Core to Theme
  • Keywords has-patch added

#2 @johnjamesjacoby
11 years ago

We'll want to audit this to make sure. It's also going to change all child themes that have gotten used to this being the case for years thus-far. The patch is nice to have, but the change itself might have implications.

Overall, if we can confirm 100% that we're not exposing links that users should not see, I'm for this change + a communication that it's coming in 1.8.

#3 @r-a-y
11 years ago

I think the reason why we never showed the profile subnav before is because there is only one public subnav item ("View") attached to profiles.

I am certain that we are not exposing any links, but it might be aesthetically displeasing for sites to see a profile subnav bar with only one item.

What we could do instead is to introduce a filter to toggle the profile subnav. (The profile subnav will be disabled by default.) That way plugin devs that need the subnav to be shown can toggle it and all is well with the cosmos!

Let me know what you think.

#4 @boonebgorges
11 years ago

  • Keywords commit added

What we could do instead is to introduce a filter to toggle the profile subnav. (The profile subnav will be disabled by default.) That way plugin devs that need the subnav to be shown can toggle it and all is well with the cosmos!

I don't like the idea of introducing a filter just for this. If anything, perhaps we could have some logic in bp_get_options_nav() so that the subnav isn't displayed if there's only a single child item. But for 1.8, I think it would be fine just to display it all the time, aesthetes be damned. So, I'm fine with 5039.01 for 1.8.

#5 @boonebgorges
11 years ago

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

In 7211:

Show member Profile subnav for all users, not just when viewing one's own profile

The logic for hiding others' Profile subnavs comes from the fact that, as a
rule, the only subnav item available when viewing another person's profile is
View/Public. But this causes problems when plugins or themes try to add
additional tabs to user Profiles.

By removing the bp_is_my_profile() check hardcoded in the template, we rely on
the bp_core_new_subnav_item() logic in setup_nav() to do the necessary access
control (which it was already doing).

Fixes #5039

Props r-a-y

#6 @DJPaul
8 years ago

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