Opened 16 years ago
Closed 15 years ago
#775 closed defect (bug) (fixed)
Setting BP_ROOT_BLOG to Anything But 1 in Subdirectory MU Causes Redirect Loop
Reported by: | chrisscott | Owned by: | |
---|---|---|---|
Milestone: | 1.1 | Priority: | major |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
When using MU blogs as subdirectories and setting BP_ROOT_BLOG to anything but blog #1, a redirect loop is caused when trying to go to /blog-name/members/ and other BuddyPress URIs.
It looks like the first problem is caused in this line in bp-core-catchuri.php:
/* Fetch the current URI and explode each part seperated by '/' into an array */
$bp_uri = explode( "/", $path );
If the current URL is http://example.com/blog-name/members/ then $path will be /blog-name/members/ which makes the first item of the $bp_uri array empty. Since the check to shift off the blog name happens before the check to take the empties off the beginning and end of $bp_uri, the blog name doesn't get shifted off. Also, this check only happens when BP_ENABLE_MULTIBLOG is defined and it looks like it also needs to happen when BP_ROOT_BLOG is anything but 1.
I've attached a patch against trunk.
Milestone Core 1.1 deleted