Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5252 closed defect (bug) (fixed)

Beta 1.9 Fatal Error if BuddyPress folder is renamed

Reported by: trishasalas Owned by: johnjamesjacoby
Milestone: 1.9 Priority: normal
Severity: normal Version: 1.5
Component: Core Keywords: has-patch dev-feedback
Cc: trisha@…

Description

bp-core/bp-core-wpabstraction.php will not load (fatal error, file can't be found) if the BuddyPress folder is named anything other than BuddyPress. Admittedly and edge case but as I had 3 different BuddyPress folders in my downloads folder 'BuddyPress 3' was just not going to work. :)

I've duplicated this twice.

Attachments (1)

5252.01.patch (426 bytes) - added by r-a-y 8 years ago.

Download all attachments as: .zip

Change History (6)

@r-a-y
8 years ago

#1 @r-a-y
8 years ago

  • Keywords has-patch added; 2nd-opinion removed
  • Version set to 1.5

Give this patch a try and let me know if it fixes your problems.

#2 @trishasalas
8 years ago

  • Cc trisha@… added

That fixed it! ....and this is a much more elegant solution than renaming the folder :)

Thanks, @r-a-y

#3 @r-a-y
8 years ago

  • Keywords dev-feedback added
  • Milestone changed from Awaiting Review to 1.9

Thanks for testing, trishasalas.

I don't think this will break anything, but just need a sanity check from another core dev before committing.

#4 @johnjamesjacoby
8 years ago

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

In 7601:

Use plugin_dir_path() rather than hardcoded buddypress directory name. Props r-a-y. Fixes #5252.

#5 @johnjamesjacoby
8 years ago

For context, I believe it was originally hardcoded because of it possibly living in the mu-plugins directory. Since switching to using the WP_PLUGINS_DIR constant, that option disappeared anyways, so using plugin_dir_path() is now the best function for the job.

Since it's a variable in the class, it can be optionally overridden, though I'm finding that doing so isn't as easy as I'd originally hoped, and I'll likely open a new ticket to address this in a future milestone.

Note: See TracTickets for help on using tickets.