Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#6196 closed defect (bug) (wontfix)

Wrong users menu settings in backend

Reported by: ipm-frommen's profile ipm-frommen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing
Cc:

Description

The profile_admin_head function of the BP_Members_Admin class is added to the dynamic admin_head-{$hook_suffix} filter for a few cases. The problem with this is that it manipulates both the global $parent_file and $submenu_file variables, no matter what.

This results in the wrong submenu item (i.e., Your Profile) being highlighted, even if you are on the users.php page.

The attached patch fixes this behavior by improving/fixing the mechanism for setting the is_self_profile property. It does that by restricting the user ID check for the according page only.

Attachments (1)

6196.patch (963 bytes) - added by ipm-frommen 10 years ago.

Download all attachments as: .zip

Change History (7)

@ipm-frommen
10 years ago

#1 @ipm-frommen
10 years ago

Okay, I just saw on GitHub that there already is a fix for the problem. However, I think my approach is more straightforward than what is currently done. The function is added to a dynamic filter hook with the $hook_suffix global, so it should be this global on which the restriction is based. Just my two cents.

#2 @johnjamesjacoby
10 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to Under Consideration
  • Does this happen in single or multi-site?
  • Site admin or network admin?
  • Can you confirm your fix does not affect other conditions?
  • Any issues with multiblog setups too?

#3 @ipm-frommen
10 years ago

As already stated in my comment, the patch is just a (in my opinion) more straightforward version of what you already did in this commit. I am working with the current version, 2.1.1, that's why I didn't see this has been taken care of (once the new version will be published).

Last edited 10 years ago by ipm-frommen (previous) (diff)

#4 @johnjamesjacoby
10 years ago

The current version is 2.2, released Wednesday. If this is an issue in 2.1.1, updating to 2.2 will fix it for you, and should do so for all installation types.

#5 @DJPaul
10 years ago

I think @ipm-frommen's patch looks a little less brittle than the solution in 2.2, but I don't know if making a change for its own sake is something we want to do.

#6 @DJPaul
10 years ago

  • Milestone Under Consideration deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Since this is fixed, let's not fix it again for purely cosmetic gains.

Note: See TracTickets for help on using tickets.