Opened 13 years ago
Closed 13 years ago
#3176 closed defect (bug) (fixed)
Invalid URL routing for forum profile subnav item
Reported by: | 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)
#2
@
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
@
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?
#5
@
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
@
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.
(In [4281]) Fix handling of certain subnav URLs in core, xprofile, friends, members, activity, settings, blogs and message components. See #3176