#4415 closed defect (bug) (fixed)
1.6 doesn't work if NOBLOGREDIRECT is defined in wp-config?
Reported by: | 215 | Owned by: | |
---|---|---|---|
Milestone: | 1.6.1 | Priority: | normal |
Severity: | normal | Version: | 1.6 |
Component: | Core | Keywords: | |
Cc: |
Description
Defining NOBLOGREDIRECT in wp-config worked fine in 1.5.6 but breaks buddypress in 1.6
define( 'NOBLOGREDIRECT', 'http://domain.com/' );
BP Component directories seem to work fine in 1.6 (i.e. domain.com/groups and domain.com/members) but clicking on a link (i.e. domain.com/groups/create/ or domain.com/members/superkisu/) redirects to whatever you have defined as NOBLOGREDIRECT in wp-config instead of showing the correct buddypress content.
Attachments (1)
Change History (5)
#2
@
12 years ago
- Version set to 1.6
Confirmed.
The root cause is the same as for #4329; you can read my explanation there. Briefly, because our internal content is marked 404 by WP until bp_core_load_template(); the check in maybe_redirect_404() happens before that and thus catches the incorrect 404; and the redirect takes place.
The real fix (for 1.7) will have to involve fixing the 404 issue described in #4329. (IMO it is an enormous bug and I'm not sure how we've gotten this far without it causing huge problems :) ) In the interim, I suggest 4415.patch, which unhooks and rehooks maybe_redirect_404(), so that it runs after BP's template logic (instead of being in a race condition with it). We'll remove this hack fix in 1.7, when the proper fix comes. Read my inline documentation for a more complete description of the problem and the workaround.
215, could I ask you to verify that 4415.patch fixes your issue?
#3
@
12 years ago
- Resolution set to fixed
- Status changed from new to closed
(In [6252]) When running NOBLOGREDIRECT, rehook maybe_redirect_404() to priority 100.
WP's maybe_redirect_404() must run after BuddyPress's template loader function
bp_core_load_template(), or else it'll register incorrectly as a 404 and
redirect to the value of NOBLOGREDIRECT. See inline documentation for more
details.
Fixes #4415
#4
@
12 years ago
(In [6253]) When running NOBLOGREDIRECT, rehook maybe_redirect_404() to priority 100.
WP's maybe_redirect_404() must run after BuddyPress's template loader function
bp_core_load_template(), or else it'll register incorrectly as a 404 and
redirect to the value of NOBLOGREDIRECT. See inline documentation for more
details.
Fixes #4415
Not tested, but sounds possible as a result of canonical URL handling improvements made in 1.6, so putting in 1.6.1 for review.