Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#3530 closed defect (bug) (fixed)

Error when the Friend Connections is turned off

Reported by: lightcapturer Owned by:
Milestone: 1.5 Priority: major
Severity: major Version: 1.5
Component: Core Keywords:
Cc:

Description

I activate BuddyPress on subsite, and got an error when I turn off the Friend Connections. Here is the error:

Fatal error: Call to undefined function bp_get_friends_slug() in /home/xxx/public_html/xxx.com/wp-content/plugins/buddypress/bp-core/bp-core-template.php on line 1107

Change History (2)

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 1.5
  • Priority changed from normal to major
  • Severity changed from normal to major

Good catch. This is an argument for not using the convention bp_is_current_action( bp_get_friends_slug()

What should the alternative be? If we switch it to a hardcoded 'friends', then it'll break when someone defines their own BP_FRIENDS_SLUG. Perhaps a check at the beginning of all the template functions, which returns false if the component in question is disabled?

#2 @johnjamesjacoby
10 years ago

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

(In [5071]) Add active check to bp_is_user_friends_activity() and bp_is_user_groups_activity() and return false if component is inactive. Fixes #3530.

Note: See TracTickets for help on using tickets.