Skip to:
Content

BuddyPress.org

Opened 10 years ago

Last modified 9 years ago

#6173 accepted defect (bug)

'Members' menu selected when current page user profile page

Reported by: kaffeeguru's profile kaffeeguru Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version: 2.1
Component: Core Keywords: dev-feedback
Cc: mail@…

Description

In attached screen shot you can see that the current page selected is "My Profile" URL "/members/chris/profile/"

But also menu "members" URL "/members" was selected.

I checked that the current menu selection was done by wordpress core in file /wp-includes/nav-menu-template.php.
So I'm not 100% sure if this could be fixed within buddypress.

Seems like as "my Profile" also contains 'members' it selects the members link too.

Attachments (2)

Capture.PNG (110.9 KB) - added by kaffeeguru 10 years ago.
screenshot of the two menu items selected at same time.
6173.01.patch (560 bytes) - added by r-a-y 10 years ago.

Download all attachments as: .zip

Change History (11)

@kaffeeguru
10 years ago

screenshot of the two menu items selected at same time.

#1 @kaffeeguru
10 years ago

  • Cc mail@… added

#2 @johnjamesjacoby
10 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 2.2
  • Owner set to johnjamesjacoby
  • Status changed from new to accepted

#3 @johnjamesjacoby
10 years ago

  • Milestone changed from 2.2 to 2.2.1

Ran out of time for 2.2, but I have a suspicion this will need addressing in 2.2.1.

#4 @r-a-y
10 years ago

  • Keywords has-patch added; needs-testing removed

This is kind of expected behavior.

We've been highlighting the directory page even when on a single item page since v1.5. I originally sought not to do this in r8821.

But then, the issue came about that we wanted to keep the highlighting for backward compatibility, see:
https://buddypress.trac.wordpress.org/ticket/5810#comment:2

(Also see the follow-up ticket to highlight the BP page using WP nav menu and page menu filters - #5997.)

If we're okay with not highlighting the directory page when on a single page, then 01.patch is an attempt to fix this. Instead of adding the current_page_item CSS class while on a BP single item page, it adds the current_page_parent CSS class, which is more conventional to WP.

If we want to do a hack to keep directory pages highlighted while on a single page, but not highlighted when we're using a BP nav menu member page item, then we'll need to approach this another way.

Last edited 10 years ago by r-a-y (previous) (diff)

@r-a-y
10 years ago

#5 @johnjamesjacoby
10 years ago

If this is expected behavior (meaning nothing has changed) let's move this to 2.3 and reconsider changes later.

#6 @r-a-y
10 years ago

  • Keywords dev-feedback added
  • Milestone changed from 2.2.1 to 2.3

Definitely not a regression, moving to 2.3.

I've tagged this dev-feedback, because I'm not sure what we want to do.

#7 @boonebgorges
9 years ago

Is it possible for us to detect whether the menu would have more than one highlighted item, and then ensure that only one gets highlighted, in a predictable way? The behavior described here, for example, only comes up when there's a 'My Profile' link in the menu. Seems to me that if such a link is present, we should give it the current_page_item class (since it's more specific than the directory page); but in that case, we'd want to remove the class from the directory page. Too hacky?

#8 @DJPaul
9 years ago

  • Milestone changed from 2.3 to Future Release

#9 @DJPaul
9 years ago

  • Keywords has-patch removed
Note: See TracTickets for help on using tickets.