Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Subpages of root component disappeared after upgrade to latest SVN (4 posts)

Started 8 months, 2 weeks ago by: Travel-Junkie

  • Profile picture of Travel-Junkie Travel-Junkie said 8 months, 2 weeks ago:

    Hello all,

    just a quick question for the core devs. Just upgraded to the latest 1.5 SVN version. Now, in Buddyvents, subpages of the root page are unavailable. The root page is available cause a direct match is found in the bp catch uri function. I’ve then tracked it down to Buddyvents not being present in $bp->active_components, even though I’ve added it to the bp_setup_globals hook. Used to work before, but not anymore. What hook should I use to register plugins in the active_components array?

    Cheers!

  • Profile picture of Travel-Junkie Travel-Junkie said 8 months, 2 weeks ago:

    Ended up using register_activation_hook and register_deactivation_hook to modify the bp-active-components option, which populates the $bp->active_components array.

  • Profile picture of Boone Gorges Boone Gorges said 8 months, 2 weeks ago:

    Hm. That’s not a very good general solution :) Can you share the code you’re using at bp_setup_globals? I don’t think anything has changed recently in BP that would cause this kind of problem (I’ve got an install running a couple dozen plugins on the latest trunk, with no problems like this), but if there is a problem, we should figure it out soon :)

    Do you happen to remember how much time happened between your svn ups? Days, weeks, months?

  • Profile picture of Travel-Junkie Travel-Junkie said 8 months, 2 weeks ago:

    That would’ve been something like this:

    function bpe_setup_globals()
    {
        global $bp;
    
        // some stuff
    
        $bp->active_components['events'] = 1;
    
        // some more stuff
    }
    add_action( 'bp_setup_globals', 'bpe_setup_globals' );

    It’s probably been 5 days to a week since the last upgrade.

    Mine might not be the most elegant solution, but at least it makes sure that my plugin is working :)