Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 5 years ago

#5489 closed defect (bug) (duplicate)

Symlinked 'buddypress' directory not referenced when setting buddypress()->file

Reported by: r-a-y Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.6
Component: Core Keywords: has-patch dev-feedback
Cc:

Description

If we are manually defining the BP_PLUGIN_DIR constant for symlinking purposes, buddypress()->file does not take this into consideration.

This notably breaks the bp_is_network_activated() function because buddypress()->basename references __FILE__ instead of the symlinked directory.

To test:

  • Set up a new multisite install with the 'buddypress' directory symlinked.
  • Network-activate BuddyPress and go to the network admin dashboard
  • You won't see the following items: "Settings > BuddyPress", "Tools > BuddyPress"

Attached patch addresses this by setting buddypress()->file to use the BP_PLUGIN_DIR constant.

Attachments (1)

5489.01.patch (501 bytes) - added by r-a-y 6 years ago.

Download all attachments as: .zip

Change History (7)

@r-a-y
6 years ago

#1 @r-a-y
6 years ago

  • Keywords has-patch added

#2 @boonebgorges
6 years ago

I've experienced this exact problem before.

r-a-y, I think that your patch looks like the right solution, but in an abundance of caution (and since this is not a regression in 2.0), I'd prefer to do it for 2.1. Is that OK with you?

#3 @DJPaul
6 years ago

  • Milestone changed from Awaiting Review to 2.1

Do the plugins directory symlink changes in WP 3.9 affect this at all?

#4 @r-a-y
6 years ago

Do the plugins directory symlink changes in WP 3.9 affect this at all?

Since __FILE__ is PHP-specific, WP 3.9 will not affect this ticket. When symlinked, __FILE__ references the original file.

#5 @DJPaul
5 years ago

  • Keywords dev-feedback added

r-a-y can this be closed in favour of #5652 ?

#6 @r-a-y
5 years ago

  • Milestone 2.1 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

can this be closed in favour of #5652 ?

I'd say so. Closing!

Note: See TracTickets for help on using tickets.