Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

#6475 closed defect (bug) (fixed)

Unable to set BP directory Members as child page

Reported by: hnla's profile hnla Owned by:
Milestone: 2.3.1 Priority: high
Severity: major Version: 2.3.0
Component: Core Keywords: has-patch
Cc:

Description

Previously ( BP 2.2.3.1 ) you could create a page e.g 'The Community' you could then set the Members page (bp required blank page) as a child of this parent producing a url in the form of /the-community/members/

In 2.3 this behaviour no longer works and the parent page is stripped from the url leaving the /members/ located back to the root url. Menu hierarchy still displays correctly though.

Reported on the forum topic:
https://buddypress.org/support/topic/members-directory-page-broken-after-update/#post-240174

Attachments (1)

6475.01.patch (2.6 KB) - added by r-a-y 9 years ago.

Download all attachments as: .zip

Change History (14)

#1 @hnla
9 years ago

Correction to above:

Nesting the BP page as above results in a blank page at /community-members/members/ while /community-members/groups/ works as expected.

I had an occurrence where I had page 'members' appearing as nested under page '/community-members/' and in turn 'community-members' was a child of a top level page 'the-community' BP was set as members page = 'community-members', navigating to '/the-community/community-members/' dropped me to '/community-members/' with a working loop. Oddly I'm fairly sure I hadn't created the 'members' page or at least originally had edited 'members' to be 'community-members' wondering if that is another issue.

Version 0, edited 9 years ago by hnla (next)

@r-a-y
9 years ago

#2 @r-a-y
9 years ago

  • Component changed from API to Component - Core
  • Keywords has-patch added
  • Severity changed from normal to major
  • Version set to 2.3.0

01.patch fixes two issues:

  • Rendering the Members directory if the Members page is nested (/community/members/)
  • Rendering a user profile if root profiles is enabled and if the Members page is nested
  • Bonus: Saves a DB query when root profiles is enabled :)

Other component directory pages should continue to work.

Don't have time for unit tests at the moment since it's late here, but please test and let me know if there are any issues.

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

#3 @boonebgorges
9 years ago

Confirmed introduced in [9723]. It's proving tricky to reproduce in unit tests.

#4 @boonebgorges
9 years ago

In 9913:

Empty buddypress()->pages before each unit test.

This ensures that globals can be modified safely within the confines of a
specific test method.

See #6475.

#5 @boonebgorges
9 years ago

In 9914:

Allow Members directory pages to be nested under other pages.

A bug was introduced in [9723] that broke the way that URIs are parsed when
viewing a Members directory page, when that page is the child of another
WP page.

Props r-a-y.
See #6475.

#6 @boonebgorges
9 years ago

I managed to write a test for the nested-page problem, and I confirmed r-a-y's fix of only resetting the $uri_offset when viewing a member page. This bug appears to have resulted in a lapse of judgment in [9723].

I'm going to look more in-depth at the root profiles issue. Do we know whether that's also a regression in 2.3?

#7 @boonebgorges
9 years ago

I've confirmed that root profiles are broken when the members page is nested, but it appears that this is *not* a regression in 2.3 - it's broken at least back to 1.8 (earliest I checked).

I'm nervous (for reasons that should be obvious given the above!) to make changes to the URI router that are broader than necessary to fix 2.3 regressions, at least for 2.3.1. Thus I'd like to move concerns about root profiles + nested members pages to a separate ticket.

#8 @boonebgorges
9 years ago

See #6477 for the separate issue.

hnla, could I ask you to verify the fix in [9914] before I port it to the 2.3 branch?

#9 @hnla
9 years ago

@boonebgorges will have a look in a second.

#10 @hnla
9 years ago

@boonebgorges that all seems to check out fine now, can nest the page happily.

#11 @boonebgorges
9 years ago

In 9916:

Allow Members directory page to be nested, after [9723].

Merges [9913] and [9914] into the 2.3 branch.

Props r-a-y.
See #6475.

#12 @boonebgorges
9 years ago

Thanks for the help, everyone.

#13 @r-a-y
9 years ago

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

Thanks for breaking out the root profiles fixes into #6477, Boone.

Note: See TracTickets for help on using tickets.