Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] BP 2.6 – bp_get_current_group_id() fatal error


  • sharmavishal
    Participant

    @sharmavishal

    on a wp multisite. bp network activated. setup a new subdomain. neither the site nor the admin comes up. following error

    Fatal error: Call to undefined function bp_get_current_group_id() in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-group-extension.php on line 484

Viewing 25 replies - 1 through 25 (of 27 total)

  • valuser
    Participant

    @valuser

    Not replicated here – (so far)

    On a multisite local install – have added a site (sub-domain) successfully.

    Just added a site via Sites—> Add New

    Without the error notified by @sharmavishal

    WP 4.5.2
    BuddyPress Version 2.6.0-beta1 Network Activated
    PHP Version 5.5.24
    Plugins (network activated): lots – all latest versions


    sharmavishal
    Participant

    @sharmavishal

    @valuser was yours a new setup? mine is with existing bp setup with groups


    valuser
    Participant

    @valuser

    old testing site with an existing bp setup with groups.

    ok i’ve now got no error (so far) on an old but up to-date online multi-site multinetwork testing site with an existing bp setup with lots of groups.

    set-up
    WP 4.5.2
    BuddyPress Version 2.6.0-beta1 Network Activated
    PPHP Version 5.4.43
    MySQL Version 5.5.45-cll-lve
    Plugins: lots
    WP 4.5.2
    BuddyPress Version 2.6.0-beta1 Network Activated


    sharmavishal
    Participant

    @sharmavishal

    Old sub domains work fine..new sub site doesn’t for me…all stuff updated


    valuser
    Participant

    @valuser

    Different here. No error.

    To clarify

    When i saw your notice

    my original post
    On a multisite local install – have added a site (sub-domain) successfully.

    This set-up was a pre existing testing installation.

    i can successfully add a new subdomain.

    Am unable to replicate the error you are experiencing.

    My second post confirmed that i was doing this on an old testing site with an existing bp setup with groups – but this again was in relation to creating a new site (sub-domain) in the set-up – no error.

    I’d imagine the devs would have given this a once over when they first saw your post ?

    cos its important!
    Cheers.


    sharmavishal
    Participant

    @sharmavishal

    Thanks maybe some plugin is creating that conflict…let me check and will update this thread


    harrytsang
    Participant

    @harrytsang

    I can confirm what sharmavishal said have also happened on my multisite setup…


    valuser
    Participant

    @valuser

    see

    BuddyPress 2.6.0 Release Candidate 1…

    perhaps best, if not already, to leave a ticket at

    https://buddypress.trac.wordpress.org/newticket

    hope you get it sorted.


    r-a-y
    Keymaster

    @r-a-y

    @sharmavishal @harrytsang – I have split this bug report into its own topic from the main beta topic thread.

    Can you please list the steps for how you are encountering this fatal error? On what page? We need to duplicate this bug. Also, list the plugins you are using.


    sharmavishal
    Participant

    @sharmavishal

    @r-a-y existing multisite site setup. bp activated network wide. added a new site via add new site in admin….the site added page comes up..but when u click on dashboard of new site or visit new site both dont come up….the error mentioned before….tested with rc1 bp also..following debug error with rc1:

    Fatal error: Call to undefined function bp_get_current_group_id() in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-group-extension.php on line 484


    sharmavishal
    Participant

    @sharmavishal

    if it helps following non bp errors with rc1

    Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in wp-includes/functions.php on line 3897

    Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). === Trace: #6 wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php(421): get_current_user_id() #7 wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php(31): Yoast_Notification_Center->retrieve_notifications_from_storage() #8 wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php(49): Yoast_Notification_Center->__construct() #9 wp-content/plugins/wordpress-seo/wp-seo-main.php(373): Yoast_Notification_Center::get() #10 [internal function]: load_yoast_notifications(”) #11 wp-includes/plugin.php(525): call_user_func_array(‘load_yoast_noti…’, Array) #12 wp-settings.php(277): do_action(‘plugins_loaded’) #13 /opt/www/hobbysocialnetwork.c in wp-includes/functions.php on line 3897

    even with yoast seo disabled the site doesnt come up


    r-a-y
    Keymaster

    @r-a-y

    @sharmavishal – I tested on a multisite subdirectory setup and going to the “Network Admin > Sites” dashboard page to create a new site (is this what you used as well?) and I could not duplicate the error.

    I’m guessing it is a BP group extension plugin that is loading too early. Do you have any BP group plugins installed on your site?


    sharmavishal
    Participant

    @sharmavishal

    BuddyPress Groups Extras am using deactivated it…created a new site via add new same issue


    r-a-y
    Keymaster

    @r-a-y

    @sharmavishal – Can you add the following in wp-content/plugins/buddypress/bp-groups/classes/class-bp-group-extension.php:

    if ( defined( 'WP_NETWORK_ADMIN' ) ) {
    	echo get_called_class();
    }
    

    Right before this:

    // Usually this will work.
    $group_id = bp_get_current_group_id();
    

    This should print the names of the group extension classes that are being loaded right before the fatal error.

    Can you copy and paste this info here?

    Thanks!


    danbp
    Participant

    @danbp

    @sharmavishal,

    FYI, the bbp_setup_current_user notice is explained on bbPress codex.


    sharmavishal
    Participant

    @sharmavishal

    @danbp thanks..yeah read that…

    added the code…line number changes..

    Fatal error: Call to undefined function bp_get_current_group_id() in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-group-extension.php on line 486


    sharmavishal
    Participant

    @sharmavishal

    refreshed the page and strangely line number changed

    Fatal error: Call to undefined function bp_get_current_group_id() in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-group-extension.php on line 488


    r-a-y
    Keymaster

    @r-a-y

    @sharmavishal – Do you see anything printed in the browser when the fatal error occurs?

    Something like:
    BP_Groupblog_ExtensionBBP_Forums_Group_Extension?


    r-a-y
    Keymaster

    @r-a-y

    Try this snippet instead:

    if ( defined( 'WP_NETWORK_ADMIN' ) ) {
    	error_log( 'group extension: ' . get_called_class() );
    }

    Make sure that WP_DEBUG is turned on. Then, when the fatal error occurs, check wp-content/debug.log to see if anything is logged with group_extension:.


    sharmavishal
    Participant

    @sharmavishal

    dont think so

    this is the site

    kindly delete the site name from this forums after u had a look at it…..

    if you want can pass on admin credentials for u to test/check


    sharmavishal
    Participant

    @sharmavishal

    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);
    define(‘WP_DEBUG_DISPLAY’, true);

    above defined in wp-config.php

    i dont get wp-content/debug.log

    added the new snippet but no new logs


    sharmavishal
    Participant

    @sharmavishal

    got it ray

    /wp-includes/functions.php on line 3897
    BP_Event_Organiser_Group_ExtensionBP_WiseChat_Group_ExtensionRTMediaGroupExtensionBBP_Forums_Group_Extension


    sharmavishal
    Participant

    @sharmavishal

    if i deactivate BuddyPress Event Organiser By Christian Wach and wise chat the sub domain comes up


    r-a-y
    Keymaster

    @r-a-y

    You should only activate group extensions on the BuddyPress site whenever possible, not network-wide.

    What happens when you activate the group extensions only on the BuddyPress site?


    sharmavishal
    Participant

    @sharmavishal

    @r-a-y bingo!!!! thats it…thanks a lot for your time on this..highly appreciated…

    hope this also fixes @harrytsang issues as well

Viewing 25 replies - 1 through 25 (of 27 total)
  • The topic ‘[Resolved] BP 2.6 – bp_get_current_group_id() fatal error’ is closed to new replies.
Skip to toolbar