[buddypress-trac] [BuddyPress] #3579: Issues with legacy plugin directory page and wordpress Standard

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Sep 15 20:30:12 UTC 2011


#3579: Issues with legacy plugin directory page and wordpress Standard
----------------------+------------------
 Reporter:  sbrajesh  |       Owner:
     Type:  defect    |      Status:  new
 Priority:  critical  |   Milestone:  1.5
Component:  Core      |     Version:  1.5
 Severity:  critical  |  Resolution:
 Keywords:            |
----------------------+------------------
Changes (by boonebgorges):

 * priority:  major => critical
 * severity:  major => critical


Comment:

 Thanks, sbrajesh.

 The problem is indeed related to r5105. Here's what's happening:

 The bp_is_active() check introduced in r5105 checks against
 $bp->active_components. Core components are recorded in this array from an
 option in the wp_options table very early in the loading process. Third-
 party components, on the other hand, are responsible for registering
 themselves (like you do in bp-gallery -
 $bp->active_components[$bp->gallery->slug], etc.). Most plugins do this in
 their global setup routine, which should be hooked to bp_setup_globals.
 That means that bp_is_active( $component ) will work properly for third-
 party $component when fired *after* bp_setup_globals (because then the
 component will be in the active_components array) but not *before*. And
 since bp_core_set_uri_globals() runs before bp_setup_globals, it doesn't
 work.

 I think the solution is to revert r5105 and find a better solution for the
 problem it was meant to solve. I'd like to have feedback from jjj on this
 before moving forward, as he was the one who initially made the change.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3579#comment:5>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list