[buddypress-trac] [BuddyPress Trac] #7140: Class autoloading needs to check if the component is active before including the class

buddypress-trac noreply at wordpress.org
Fri Jun 24 20:09:58 UTC 2016


#7140: Class autoloading needs to check if the component is active before
including the class
--------------------------+--------------------
 Reporter:  r-a-y         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.6.1
Component:  Core          |     Version:  2.6.0
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |
--------------------------+--------------------

Comment (by r-a-y):

 > How widespread/severe of a problem is this? (How soon do we need to do
 2.6.1?)

 This issue is mostly only applicable for:
 - Sites that do not have the Groups component active; and
 - Has a BP plugin activated that also has group functionality; and
 - That BP plugin only checks if the group component is active with
 `class_exists()` instead of `bp_is_active( 'groups' )`.

 So that should narrow down the problem to a relatively small subset of
 sites.

 I did a quick search on Github for wp.org plugins only doing
 `class_exists( 'BP_Group_Extension' )` checks without `bp_is_active(
 'groups' )` and came across the following:
 - BP Group Suggestions - https://github.com/wp-plugins/bp-groups-
 suggestions/blob/master/loader.php#L22
 - BuddyPress Activity Graph - https://github.com/wp-plugins/buddypress-
 activity-graphs/blob/master/buddypress_activity_graph.php#L98
 - BP Group Documents - https://github.com/wp-plugins/bp-group-
 documents/blob/master/buddypress-group-documents.php#L10
 - BuddyForms Attach Post with Group - https://github.com/wp-plugins
 /buddyforms-attach-posts-to-groups-extension/blob/master/includes/group-
 extension.php#L2
 - VideoWhisper - https://github.com/wp-plugins/videowhisper-video-
 presentation/blob/master/videowhisper_presentation.php#L1654

 There were also many other instances on Github (including some by BP
 contributors!).

 I think we should strive for a minor release next week during dev chat.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7140#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list