Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

#3176 closed defect (bug) (fixed)

Invalid URL routing for forum profile subnav item

Reported by: DJPaul Owned by:
Priority: critical Milestone: 1.5
Component: Forums Version: 1.5
Severity: Keywords: needs-patch dev-feedback
Cc:

Description

On trunk:

http://testbp.org/members/this_is_made_up/ 404s correctly.
http://testbp.org/members/this_is_made_up/profile/ does not 404; it renders a lot of the template and generates a lot of PHP Notices.

Change History (8)

#1 @djpaul
15 years ago

(In [4281]) Fix handling of certain subnav URLs in core, xprofile, friends, members, activity, settings, blogs and message components. See #3176

#2 @DJPaul
15 years ago

Groups and forums components need patching differently because of the way they use the displayed_user (or don't).
/members/admin/forums also seems to render the forums directory template at the moment, which needs fixing first.

#3 @r-a-y
15 years ago

(Edit) The patch in #3246 will fix the problem noted in the original ticket description.

It doesn't fix /members/INVALID/forums/.

Paul, can you list an example for groups?

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

#4 @DJPaul
15 years ago

  • Resolutionduplicate
  • Status newclosed

See #3246

#5 @r-a-y
15 years ago

  • Keywords needs-patch added
  • Resolution duplicate
  • Status closedreopened
  • Summary invalid URL routing for certain profile subnav itemsInvalid URL routing for forum profile subnav item

#3246 doesn't fix /members/INVALID/forums/. It loads the forum directory like Paul noted above.

I'll take a look at this in a bit.

#6 @r-a-y
15 years ago

  • Component CoreForums
  • Keywords dev-feedback added

A potential solution involves checking the $bp_unfiltered_uri global in bp_forums_directory_forums_setup().

eg.

function bp_forums_directory_forums_setup() {
	global $bp, $bp_unfiltered_uri;

	if ( bp_is_forums_component() && !isset( $bp_unfiltered_uri[1] ) && ( !bp_current_action() || 'tag' == bp_current_action() ) && !bp_current_item() ) {
		... the rest of the function ...

I'm using the $bp_unfiltered_uri check here because bp_is_directory() isn't true until later in the function.

Did not provide a patch because I'm not sure if the core devs like this approach.

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

#7 @DJPaul
15 years ago

Looks good / works for me. I'll put it in

#8 @djpaul
15 years ago

  • Resolutionfixed
  • Status reopenedclosed

(In [4501]) Stop forum directory template loading for invalid member forum URLs. Fixes #3176, props r-a-y

Note: See TracTickets for help on using tickets.