Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Writing a new plugin – get 404 not found when accessing screen

Well I couldn’t resist investigating further, and it turns out that the code that BuddyPress runs to compare the URL to the `$bp->root_components` array happens during the `bp_loaded` action, which happens during the WP `plugins_loaded` action, which seems to happen *before* the `bp_init` action – which is the action I’m supposed to use to cause my plugin’s code to be loaded in the first place.

So basically it seems I’m screwed if I want to cleanly add a root component to BuddyPress from within my plugin. I’ll have to do a bit of fudging in my plugin’s `loader.php` file instead.

Skip to toolbar