Skip to:

Opened 10 years ago

Closed 10 years ago

#5873 closed defect (bug) (fixed)

bp_core_get_packaged_component_ids() conflict with bbPress

Reported by: r-a-y's profile r-a-y Owned by: djpaul's profile djpaul
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch


If you enable the bbPress plugin and navigate to a user's "Forums" page, you'll notice that the subnav is missing (Topics Started, Replies Created, Favorites, Subscriptions).

The issue is the addition of the bp_core_get_packaged_component_ids() function, which is used in bp_is_current_component_core() and then used in the /members/single/plugins.php template for subnav rendering checks.

The 'forums' ID references the legacy forums component. However, the 'forums' ID is also used by the bbPress plugin when registering its BP component.

Attached patch checks to see if the legacy forums component is enabled using class_exists(). If it is enabled, we add the 'forums' ID back in.

Attachments (1)

5873.01.patch (685 bytes) - added by r-a-y 10 years ago.

Download all attachments as: .zip

Change History (7)

10 years ago

#1 @DJPaul
10 years ago

Can you explain why bp_is_active( 'forums' ) wouldn't work here?

#2 @r-a-y
10 years ago

You're right. bp_is_active( 'forums' ) should work.

For some reason, I thought bbPress was registering itself as an active component in BP, but it's not.

In BP Skeleton Component, we've been telling plugin devs to register themselves into the $bp->active_components array, but bbPress doesn't do this.

I'm okay with going with the bp_is_active() check, but the class check is more accurate.

Version 0, edited 10 years ago by r-a-y (next)

#3 @DJPaul
10 years ago

Perhaps new bbPress doesn't do that for compatibility with this kind of code in BuddyPress; that kind of makes sense. I agree with your class check in case new bbPress ever changes in the future.

#4 @DJPaul
10 years ago

See also #5864

#5 @SGr33n
10 years ago

Hi :)

From #5864 I would also report that on the user replies page, the reply button in the "bbp-reply-header" redirect to a wrong BuddyPress page instead of the correct bbPress page.


Instead of:

#6 @djpaul
10 years ago

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

In 9012:

Core: only return forums from bp_core_get_packaged_component_ids() if using bbPress 1.

This otherwise causes the bbPress 2's subnav bar to not be rendered in templates due to the behaviour of members/single/plugins.php.

We would normally consider using bp_is_active for this kind of check, but because both bbPress 1 and (possibly, in the future) 2 could return true, we need a more reliable check for bbPress 1 only; see the ticket for full details.

See #5552. Fixes #5873, props r-a-y.

Note: See TracTickets for help on using tickets.