group creation error: Are you sure you want to do this?
-
I have a fresh install and was able to create my first group without problems.
Now when I go to create a group, I get to the step where it says, add a forum and I click next.
Normally, it would show me the screen to upload an avatar for the group, but now on that step, I do not see the avatar step. I only see ‘previous and next’ buttons.
If I click next, I get a white page saying ‘Are you sure you want to do this?’ with a button to go back…
I do not have any further plugins activated, and nothing changed between creating my first group and trying to create the second group.
I did try deactivating buddypress and reactivating but that made no difference.
How do I get around this error?
also:
I noticed the group gets created even though I don’t make it past that step. However you cannot post to the groups forums, as it spits out an error when making a post. It’s almost like the group creation is getting stuck somehow.
I should also mention that there are no errors in any of the server logs, either system or php errors
-
Digging into the database I see something really weird going on when I try to create a group.
When I get to the avatar step I mentioned above, where there is no avatar to crop only the next/previous buttons, It shows the group as already created.
however:
in the database table wp_bp_groups it is creating 2 new rows when a group is created
1. shows the proper name/description/creation time etc..
2. there is another group id 1# higher than the created one, with no information in the db table and the date created shows all zero’s.
I can’t imagine it’s supposed to be doing this, creating 2 rows int he db, 1 being all blank.
Also I notice the the forums table is not being updated, so there is no new group forum being created.
Finally I tried to create a group with no forum associated, but still end up with the same problem. When I click on next, I get the following:
http://shawngaffney.anointed.net/files/2010/03/20100327_badgroup.jpg
This sounds to me like there is something broken in your theme. Can you try the default theme and see if it works?
I’m sorry, I should have mentioned that I did try reverting the theme back to ‘stock’ but it has the same problem.
@andy — I know your a very busy guy, but if it helps to troubleshoot a possible issue, I can provide you with admin server/database access so you could dig around a bit. I’ll send a pm with info just in case. If your to busy, then obviously don’t worry about the pm.
Here is a screenshot of the bp_groups table in the db. Notice all the blank rows
http://shawngaffney.anointed.net/files/2010/03/20100327_bpgroupstable.jpg
Every time I create a new group I end up with 2 new rows. I row is correct, and is always followed by a second blank row.
Also, there are no new entries created in any of the bb forums database tables.
**No other plugins activated during group creation, and also using default theme as a test. Basically a ‘virgin’ bp setup gone awry yet again..
I was able to create the first group with no problems, however since then I cannot create any new groups without these errors.
The only thing I can think of, is I created a group and deleted it, as I was not happy with the group name. since then all groups created are screwed up like this….. maybe something wrong in the delete group functions?
turns out it was a conflicting plugin called connections that I forgot to turn off during testing. Once I deactivated that plugin then all was well again.
The really weird part is there are no errors in the server logs, so I am unsure of how to troubleshoot this compatibility issue. To bad, because connections is a nice plugin
Having the same problem, only not using connections…
And I can’t seem to find a solution for this. I activated/deactivated/removed all sorts of plugins with no effect.
same here – default theme, no additional plugins…the error does not occur if I use a default avatar vs. uploading one
Hi,
i had ths issue to. Created dual groups (1 blank) and would not allow forum posts through the group.
I resolved this by going into phpmyadmin, browsing the database in the bp_groups table and deleting each entry and starting again.
Now it all works sweet! resolved the avatar upload issues also.
So, you have to delete ALL database entries in bp_groups? If yes, please tell us now ( while it’s not too late ) My website is still in BETA for now, so it would really help me to know for sure…
And I would hate to reinstall, because I already have a few users even in the beta stage.
This is seriously strange. I have the same issue when creating groups.
In step 3, I just get the error message “There was an error saving group details. Please try again.” The group is still being created, though. I’ve tried all of the solutions above, but the creation steps are still not working as they should.
I’ve even tried emptying the database tables bp_groups and such. Still same thing.
You have more than one problem in your install unlike the singular issues posted above. Before blaming everything on BuddyPress, make sure you’ve got your WordPress working https://codex.buddypress.org/getting-started/before-installing/. Where are you hosted? Single site or Multisite? BP/WP versions used?
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:(
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…
somewhere in between group-details and group-settings `bp_new_group_id` cookie is getting wiped out… can’t figure out why yet…
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.
@John McKenney
Great fix for use of the BP Template Pack and group creation. I was finally able to use my custom theme and create a group no problem
However since you saved the cookies if you create a second group it saves your info from the first cookie gets placed there and sometimes you overide that group.
Hopefully the BP Template Pack gets seriously overwritten once 1.2.6 comes out (they said a new version is coming but as 1.2.6 is already late we’ll see when that thing comes out)
@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…
I saw the exact same scenario as Anointed described in the first 2 messages of this thread. I tried to perform some experiments with fresh installs and believe I may have linked at least one of my issues to an interaction between BuddyPress and Multi-DB.
I just posted a support request at:
http://premium.wpmudev.org/forums/topic/buddypress-forum-posting-problem-possibly-linked-to-multi-db
which describes what I did in more detail.– Scott
I have found a possible bug in the BlogsMU Theme that can account for the group creation bug scenario exactly as described by Anointed.
I posted some details along with a proposed fix here:
http://premium.wpmudev.org/forums/topic/buddypress-group-creation-bug-in-blogsmu-theme-with-proposed-fixEven if one isn’t using the BlogsMU theme, it is possible that the same scenario I described in the link above could occur with an incorrect URL reference in another theme.
I’m wondering if it might be better/safer if BuddyPress avoided cookies altogether in the group creation process and instead relied on the URL to carry state information?
– Scott
I believe I have found a solution! Found it here:
http://ghostpool.com/support/topic/buddypress-groupsforums-creation-problemsAll 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:)
Another with the same problem, but with Unplugged theme.
Don’t know how to apply that last fix from Josh.
Wich is the exactly path for that file?@parufito add code to your active theme’s functions.php file. If your theme doesn’t have one, create functions.php and add the code between “, save and upload to your active theme.
Thanks! i put it on the default functions theme becouse i think that my theme use that!
and it seems that is working!!
4 groups created without problem
I’ve another question. Which is the repercussion of disabling Thickbox on the whole buddypress enviroment?
Thanks for the save. I am using BP for a real estate site for a client, and came across this error in group creation, step 3. I need thickbox for my photos, so changed Josh’s code to apply only during group creation:
`add_action( ‘wp_print_scripts’, ‘my_deregister_javascript’, 100 );
function my_deregister_javascript() {
if(bp_is_group_create()) {
wp_deregister_script( ‘thickbox’ );
}
}`So far so good.
Thanks Josh!!1
- The topic ‘group creation error: Are you sure you want to do this?’ is closed to new replies.