Skip to:

Opened 15 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's profile chrisscott Owned by:
Milestone: 1.1 Priority: major
Severity: Version:
Component: Keywords:


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

Attachments (1)

bp-core-catchuri-patch.txt (644 bytes) - added by chrisscott 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @(none)
15 years ago

  • Milestone Core 1.1 deleted

Milestone Core 1.1 deleted

#2 @apeatling
15 years ago

  • Milestone set to 1.1

#3 @chrisscott
15 years ago

Note the attached patch applies cleanly to 1.0.3.

#4 @apeatling
15 years ago

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

Thanks fixed in r1715

Note: See TracTickets for help on using tickets.