Opened 14 years ago
Closed 14 years ago
#2950 closed defect (bug) (fixed)
Upgrading from 1.2.6 to 1.3 disables site
Reported by: | wpmuguru | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | has-patch |
Cc: |
Description
In my test environment, it only happened on the front end but anyone running a theme or plugin that uses a BP function across the WP admin area will have a disabled site when they upgrade.
The error I got was call to undefined function bp_...
A use case where this would happen is a theme that modifies the admin bar by adding or removing links.
The test I use to determine if BP is active is whether the constant BP_VERSION is defined. The bp_loaded, bp_init, bp_include hooks per http://codex.buddypress.org/plugin-development/checking-buddypress-is-active/ are not accessible to themes because those hooks fire before the theme is loaded.
Attachments (1)
Change History (5)
#2
follow-up:
↓ 3
@
14 years ago
I may be misunderstanding, but can't a theme's functions.php hook into one of those actions and do its thing there?
This is also sort of related to #2789
#3
in reply to:
↑ 2
@
14 years ago
Replying to DJPaul:
I may be misunderstanding, but can't a theme's functions.php hook into one of those actions and do its thing there?
No, plugins_loaded is fired before the theme functions.php is loaded by WP.
https://core.trac.wordpress.org/browser/trunk/wp-settings.php#L204
https://core.trac.wordpress.org/browser/trunk/wp-settings.php#L279
#4
@
14 years ago
- Milestone changed from Awaiting Review to 1.3
- Resolution set to fixed
- Status changed from new to closed
Since this ticket, effort has been put in to make sure that we don't kill sites after a new version of BuddyPress is installed but before the update scripts are run.
BP_VERSION isn't used in the upgrade script.