WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Version 5.1.4 breaks with BP error (8 posts)

  1. Mike Little
    Member
    Posted 2 years ago #

    I'm seeing the following error with the latest events-manager version (5.1.4) on a BuddyPress site

    PHP Fatal error: Class 'BP_Groups_Member ' not found in .../wp-content/plugins/events-manager/buddypress/bp-em-groups.php on line 85

    edit: I should note, this is only in the admin screens. Front end seems to be ok (at least the home page shows).

    http://wordpress.org/extend/plugins/events-manager/

  2. Mike Little
    Member
    Posted 2 years ago #

    I've just checked and if I turn on BuddyPress groups, the error goes away. So you should be checking whether groups are enabled (or that the class exists) before trying to use the class.

  3. Mike Little
    Member
    Posted 2 years ago #

    This patch will fix the problem.

    --- buddypress/bp-em-groups.php.bak 2012-03-25 12:35:06.322139064 +0100
    +++ buddypress/bp-em-groups.php 2012-03-25 12:35:06.322139064 +0100
    @@ -82,6 +82,7 @@
        if( is_user_logged_in() ){
            global $wpdb;
            //find out what private groups they belong to, and don't show private group events not in their memberships
    +        if (class_exists( 'BP_Groups_Member' ) ) {
                $group_ids = BP_Groups_Member::get_group_ids(get_current_user_id());
                if( $group_ids['total'] > 0){
                    $conditions['group_privacy'] = "(<code>event_private</code>=0 OR (<code>event_private</code>=1 AND (<code>group_id</code> IS NULL OR <code>group_id</code> = 0)) OR (<code>event_private</code>=1 AND <code>group_id</code> IN (".implode(',',$group_ids['groups']).")))";
    @@ -90,6 +91,7 @@
                    $conditions['group_privacy'] = "(<code>event_private</code>=0 OR (<code>event_private</code>=1 AND (<code>group_id</code> IS NULL OR <code>group_id</code> = 0)))";
                }
    +       }
        }
        return $conditions;
     }
     add_filter('em_events_build_sql_conditions','bp_em_group_events_build_sql_conditions',1,2);
  4. agelonwl
    Member
    Posted 2 years ago #

    thx for sharing.

  5. Mike Little
    Member
    Posted 2 years ago #

    I'm surprised to see you have issued another version (5.1.4.3) without fixing this 500 error.

    What gives?

  6. agelonwl
    Member
    Posted 2 years ago #

    the issue on Class 'BP_Groups_Member ' not found should be resolved now. Please noticed the fixed at bp-em-core.php

    if( bp_is_active('groups') ){
    			$includes[] = 'buddypress/screens/group-events.php';
    			$includes[] = 'buddypress/bp-em-groups.php';
    		}

    also, can you try the dev version instead? http://downloads.wordpress.org/plugin/events-manager.zip

  7. Mike Little
    Member
    Posted 2 years ago #

    Yes. That version fixes the problem. Thanks.

    When will that be officially released?

  8. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    should already be in the latest update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic