Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2559 closed defect (bug) (fixed)

trunk src restructuring broke plugin activation/de-activation/and some upgrade hooks

Reported by: djpaul's profile DJPaul Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: high
Severity: major Version: trunk
Component: API - Installation/Upgrade Keywords: has-patch
Cc:

Description

For people running trunk, the recent restructuring where the /src/ folder was added, along with the new bbpress/bbpress.php loader file, has caused a bunch of hooks that use bbpress()->basename to break. Easiest way to see this is put some debug in bbp_activation() and then activate the plugin -- your debug won't get called.

The issue is that WordPress thinks the plugin's basename is bbpress/bbpress.php, but bbPress thinks it's bbpress/src/bbpress.php or bbpress/build/bbpress.php. This causes actions hooked to bbp_activation() and bbp_deactivation() to not work, causing much sadness and rainy weather.

Running a production version (i.e. just a renamed copy of the build folder) continues to work fine, because bbPress' basename variable is the same as what WordPress thinks it is.

I've attached a patch; due to load order, I had to adjust the basename where we set it, rather than using the filter, which would have been neater.

Attachments (1)

2559.01.patch (696 bytes) - added by DJPaul 11 years ago.

Download all attachments as: .zip

Change History (4)

@DJPaul
11 years ago

#1 @DJPaul
11 years ago

Oh, forgot to mention: also fixed a long-existing typo in the bbp_plugin_basenname action name.

#2 @johnjamesjacoby
11 years ago

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

In 5317:

Don't allow build or src in basename in bbPress:setup_globals(). Fixes problems with activation hooks. Fixes #2559. Props DJPaul.

#3 @johnjamesjacoby
11 years ago

  • Milestone changed from Awaiting Review to 2.6
Note: See TracTickets for help on using tickets.