Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • @jmckenney

    Participant

    @chuckclose1 I don’t see any options to stop creating groups… Were you using this for buddypress or just wpmu?

    @jmckenney

    Participant

    I believe I have found a solution! Found it here:
    http://ghostpool.com/support/topic/buddypress-groupsforums-creation-problems

    All I know is my groups are now being created and that’s a very, very good thing. Here’s what the author of the above links suggests adding to functions.php:

    `
    // Disable Thickbox To Prevent BuddyPress Conflict
    add_action( ‘wp_print_scripts’, ‘my_deregister_javascript’, 100 );
    function my_deregister_javascript() {
    if(!is_admin()) {
    wp_deregister_script( ‘thickbox’ );
    }
    }
    `

    IT WORKED FOR ME:)

    @jmckenney

    Participant

    @dasnipe unfortunately that fix was only temporary… there was an error in the next step:( but I just found out once I deactivated buddypress welcome pack plugin it started working again. I’m hoping to now find a fix for that as I really like that plugin…

    @jmckenney

    Participant

    I narrowed down my issue to buddypress welcome pack plugin:( too bad, really liked that plugin…

    @jmckenney

    Participant

    wondering if there has been any forward movement on this. searching for some other posts…

    @jmckenney

    Participant

    You’re a saint. I understand if you can’t get to it. If it helps at all, see where I drilled down to in the code on page two of this forum topic: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/group-creation-error-are-you-sure-you-want-to-do-this.

    Also, is this plugin sanctioned as a goto method for creating buddypress themes? I know you are a core developer in Buddypress, but is this a Buddypress initiated plugin or something you saw as a need? I want to make sure i tackled the theming correctly. I was forced to go this way because I needed to use directorypress inside of buddypress and had to meld two designs together instead of starting with a child theme of bp default.

    @jmckenney

    Participant

    Paul, it was happening before 1.2.6 upgrade… I have seen some other reports, are there any resolutions to the matter overall or anywhere you can point me? Thanks for the quick reply!

    @jmckenney

    Participant

    well, I had to do some hacking in when and how it would reset the cookies… from this:
    `
    /* If no current step is set, reset everything so we can start a fresh group creation */
    if ( !$bp->groups->current_create_step = $bp->action_variables[1] ) {

    unset( $bp->groups->current_create_step );
    unset( $bp->groups->completed_create_steps );
    setcookie( ‘bp_new_group_id’, false, time() – 1000, COOKIEPATH );
    setcookie( ‘bp_completed_create_steps’, false, time() – 1000, COOKIEPATH );
    $reset_steps = true;
    bp_core_redirect( $bp->root_domain . ‘/’ . $bp->groups->slug . ‘/create/step/’ . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . ‘/’ );
    }

    /* If this is a creation step that is not recognized, just redirect them back to the first screen */
    if ( $bp->action_variables[1] && !$bp->groups->group_creation_steps[$bp->action_variables[1]] ) {
    bp_core_add_message( __(‘There was an error saving group details. Please try again.’, ‘buddypress’), ‘error’ );
    bp_core_redirect( $bp->root_domain . ‘/’ . $bp->groups->slug . ‘/create/’ );
    }

    /* Fetch the currently completed steps variable */
    if ( isset( $_COOKIE ) && !$reset_steps ) {
    $bp->groups->completed_create_steps = unserialize( stripslashes( $_COOKIE ) );
    }

    /* Set the ID of the new group, if it has already been created in a previous step */
    if ( isset( $_COOKIE ) ) {
    $bp->groups->new_group_id = $_COOKIE;
    $bp->groups->current_group = new BP_Groups_Group( $bp->groups->new_group_id );
    }
    `
    to:
    `
    /* If no current step is set, reset everything so we can start a fresh group creation */
    if ( !$bp->groups->current_create_step = $bp->action_variables[1] ) {

    unset( $bp->groups->current_create_step );
    unset( $bp->groups->completed_create_steps );
    //setcookie( ‘bp_new_group_id’, false, time() – 1000, COOKIEPATH );
    //setcookie( ‘bp_completed_create_steps’, false, time() – 1000, COOKIEPATH );
    $reset_steps = true;
    bp_core_redirect( $bp->root_domain . ‘/’ . $bp->groups->slug . ‘/create/step/’ . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . ‘/’ );
    } else {
    /* Set the ID of the new group, if it has already been created in a previous step */
    if ( isset( $_COOKIE ) ) {
    $bp->groups->new_group_id = $_COOKIE;
    $bp->groups->current_group = new BP_Groups_Group( $bp->groups->new_group_id );
    }
    }

    /* If this is a creation step that is not recognized, just redirect them back to the first screen */
    if ( $bp->action_variables[1] && !$bp->groups->group_creation_steps[$bp->action_variables[1]] ) {
    bp_core_add_message( __(‘There was an error saving group details. Please try again.’, ‘buddypress’), ‘error’ );
    bp_core_redirect( $bp->root_domain . ‘/’ . $bp->groups->slug . ‘/create/’ );
    }

    /* Fetch the currently completed steps variable */
    if ( isset( $_COOKIE ) && !$reset_steps ) {
    $bp->groups->completed_create_steps = unserialize( stripslashes( $_COOKIE ) );
    }
    `

    inside bp_groups.php inside buddypress plugin. Finally works for me…

    Notice I completely removed the need to set the cookie with a past date (deleting it) and instead just check for an existing cookie AFTER the first step.

    @jmckenney

    Participant

    somewhere in between group-details and group-settings `bp_new_group_id` cookie is getting wiped out… can’t figure out why yet…

    @jmckenney

    Participant

    bp_is_group_creation_step() is failing. inside there if ( !bp_are_previous_group_creation_steps_complete( $step_slug ) ) is failing… inside there, return bp_is_group_creation_step_complete( $previous_steps ); is failing… inside there if ( !$bp->groups->completed_create_steps ) is failing… Which means that step two is not storing that it has been created…

    bp_groups.php in buddypress plugin is not keeping $bp->groups->new_group_id between the group-details step and the group-settings step. Group settings step is supposed to update the group that was created in the group-details step. See line 1096:
    `if ( !$bp->groups->new_group_id = groups_create_group( array( ‘group_id’ => $bp->groups->new_group_id, ‘status’ => $group_status, ‘enable_forum’ => $group_enable_forum ) ) )`

    But it’s creating a new one because it didn’t have the id (thus the duplicate empty database entry). Now looking into why the new_group_id isn’t carrying over. I verified it’s being set and shows right after the first save…

    @jmckenney

    Participant

    Deleted groups in bp_groups (I had blank rows as well) and didn’t fix the issue. Disabled all themes (except for BuddyPress Template Pack). I’ve seen this in two or three forums now with no real resolution… Guess I’ll go diving into the code:(

Viewing 11 replies - 1 through 11 (of 11 total)
Skip to toolbar