Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/16/2013 07:01:10 PM (11 years ago)
Author:
boonebgorges
Message:

Don't force WP to load the 'members' page when BP_ENABLE_ROOT_PROFILES

Forcing 'members' into the $wp_query query_args forces WP to load the Members
page as the currently queried object. This, in turn, causes problems with the
(somewhat obfuscated) way that BuddyPress manually manages 404 status when root
profiles are enabled. As a result, URLs like example.com/boone/foo (where 'foo'
is a nonexistent component) loaded the raw Members WP page, rather than 404ing
as BP has such a request do under normal circumstances.

We correct the problem by refraining from forcing $wp_query to load Members.

Fixes #5149

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r7476 r7581  
    211211            $match      = $bp->pages->members;
    212212            $match->key = 'members';
    213 
    214             // Without the 'members' URL chunk, WordPress won't know which page to load
    215             // This filter intercepts the WP query and tells it to load the members page
    216             add_filter( 'request', create_function( '$query_args', '$query_args["pagename"] = "' . $match->name . '"; return $query_args;' ) );
    217213        }
    218214    }
Note: See TracChangeset for help on using the changeset viewer.