Skip to:
Content

bbPress.org

Opened 13 years ago

Closed 13 years ago

#2104 closed defect (bug) (fixed)

bbPress hijacking BP theme compat on member pages

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 2.3 Priority: normal
Severity: critical Version: 2.2.2
Component: Extend - BuddyPress Keywords: has-patch
Cc: boone@…, jmdodd@…

Description

When visiting a member's page with BP activated and BP theme compat running, bbPress detects that it's looking at a user page, and runs its own theme compat. On my installation, bbPress is winning the battle (might be a race condition, haven't checked). This seems wrong: If you are running BuddyPress, then BP should be responsible for showing user profiles, not bbPress.

The attached patch works by intercepting bbPress's theme compat early in the loading process, and shuts it off if looking at a BP member page. I'm not sure if this is the right place in the stack to handle it (like, maybe you'd want bbp_is_single_user() to return false or something). My strategy works, but it makes Subscriptions and Favorites inaccessible. (Actually, those pages appear to be inaccessible anyway, so that might be an unrelated issue.)

Attachments (1)

2104.patch (615 bytes) - added by boonebgorges 13 years ago.

Download all attachments as: .zip

Change History (8)

@boonebgorges
13 years ago

#1 @boonebgorges
13 years ago

  • Cc boone@… added

#2 @jmdodd
13 years ago

  • Cc jmdodd@… added

#3 @johnjamesjacoby
13 years ago

  • Milestone changed from Awaiting Review to 2.3

Confirmed. To reproduce:

  • Activate BuddyPress network wide.
  • Activate bbPress on the root site.

#4 @jmdodd
13 years ago

  • Cc jmdodd@… removed

#5 @jmdodd
13 years ago

  • Cc jmdodd@… added

Per IRC discussion: if BuddyPress is active, bbPress needs to noop the rewrites and redirect to BuddyPress user profiles.

#6 @boonebgorges
13 years ago

Update: Looks like the underlying race condition is causing further problems. I'm working on an installation where BP 1.6.2 is network activated and bbPress is activated on the root site, and am unable to create new topics within BP groups. After clicking submit, I'm taken back to the group topic index, with no new topic posted.

Changing the priority of the template redirector fixes it:

add_action( 'template_redirect', 'bbp_template_redirect', 9 );

I haven't dug into it, but I imagine this is a conflict with BP's canonical redirect, which is also hooked to a subaction of template_redirect:10.

#7 @johnjamesjacoby
13 years ago

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

(In [4608]) In bbp_template_include_theme_compat(), bail early if is_buddypress(). Fixes #2104.

Note: See TracTickets for help on using tickets.