Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

#3176 closed defect (bug) (fixed)

Invalid URL routing for forum profile subnav item

Reported by: djpaul's profile DJPaul Owned by:
Milestone: 1.5 Priority: critical
Severity: Version: 1.5
Component: Forums 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
13 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
13 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
13 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 13 years ago by r-a-y (previous) (diff)

#4 @DJPaul
13 years ago

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

See #3246

#5 @r-a-y
13 years ago

  • Keywords needs-patch added
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from invalid URL routing for certain profile subnav items to Invalid 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
13 years ago

  • Component changed from Core to Forums
  • 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 13 years ago by r-a-y (previous) (diff)

#7 @DJPaul
13 years ago

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

#8 @djpaul
13 years ago

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

(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.