Fatal error: Uncaught Error: Class ‘BBP_BuddyPress_Activity’ not found

Investigation

A client of mine wanted to disable the activity stream, went to Dashboard > Settings > BuddyPress > Components > Activity Streams, and Unticked the option. After they hit save, the site displayed the error ‘There has been a critical error on this website’ and the entire website (including admin dashboard) was unreachable/unusable (only returning this error). Under the hood, I found the error was “Fatal error: Uncaught Error: Class ‘BBP_BuddyPress_Activity’ not found”.

WordPress version: 5.7
bbPress Version 2.6.6

So I enabled debugging info in the wp-config.php file and received the full error (paths sanitized for security):

Fatal error: Uncaught Error: Class 'BBP_BuddyPress_Activity' not found in public_html/wp-content/plugins/bbpress/includes/extend/buddypress/loader.php:153 Stack trace:
 0 public_html/wp-includes/class-wp-hook.php(292): BBP_Forums_Component->setup_components('')
 1 public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
 2 public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
 3 public_html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(267): do_action('bp_init')
 4 public_html/wp-includes/class-wp-hook.php(292): bp_init('')
 5 public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
 6 public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
 7 public_html/wp-settings.php(560): do_action('init')
 8 public_html/wp-co in public_html/wp-content/plugins/bbpress/includes/extend/buddypress/loader.php on line 153

Because of the last line, I checked Line 153 of loader.php (as referenced above), which brought me to the ‘setup_components()’ function. Line 153 is the ‘new BBP_BuddyPress_Activity() line.

    /**
     * Instantiate classes for BuddyPress integration
     *
     * @since 2.0.0 bbPress (r3395)
     */
    public function setup_components() {

            // Always load the members component
            bbpress()->extend->buddypress->members = new BBP_BuddyPress_Members();

            // Create new activity class
            if ( bp_is_active( 'activity' ) ) {
                    bbpress()->extend->buddypress->activity = new BBP_BuddyPress_Activity();
            }

            // Register the group extension only if groups are active
            if ( bbp_is_group_forums_active() && bp_is_active( 'groups' ) ) {
                    bp_register_group_extension( 'BBP_Forums_Group_Extension' );
            }
    }

Resolution

From this, I was able to determine that bbPress thought the ‘Activity’ component was enabled, but for some reason did not have the ‘BBP_BuddyPress_Activity’ class loaded. I was able to temporarily resolve the issue by patching the ‘setup_components()’ function in the file ‘wp-content/plugins/bbpress/includes/extend/buddypress/loader.php’ with a few lines in order to manually include the ‘BBP_BuddyPress_Activity’ class if necessary:

                // Create new activity class
                if ( bp_is_active( 'activity' ) ) {
// Temporary patch!
if ( ! class_exists( 'BBP_BuddyPress_Activity' ) ){
require_once(dirname(__FILE__).'/activity.php');
}
                        bbpress()->extend->buddypress->activity = new BBP_BuddyPress_Activity();
                }

As I have patched a file within the plugin, it will be overwritten if any upgrades come out for the plugin. Because of that, I have opened a ticket in the bbPress Trac system to look for a final resolution that will survive plugin upgrades (hopefully through an update to the bbPress plugin itself).

0x800708ca This network connection does not exist

I was recently adding an additional mapped drive to an existing GPO, but the drive would not appear no matter what changes I made to the various settings (Create/Replace/Update, adding a Delete first, setting this or all drives to show, etc). Frustrated, I started digging into the event viewer and found this error:

0x800708ca This network connection does not exist

I searched online for this error and kept finding results where people were trying to get rid of existing mapped drives but were unable to. This was the opposite of what I was after! Finally I ran across a forum thread where one of the troubleshooting steps a user mentioned was to check for spaces in the drive description. I didn’t have any spaces in the drive description, but that got me thinking. A quick glance showed the functioning drives paths did *not* end with a trailing slash, but the failing drive mapping did (see following example). I removed the trailing slash, ran gpupdate on a computer, and the drive instantly appeared.

\\server\path\that\works
\\server\path\that\fails\