Possible Bug Fix: Group Creation error ”There was an error saving group details. Please try again”
-
Yes, the infamous “There was an error saving group details. Please try again” when attempting to create groups appeared on my Buddypress installation. I’ve searched for a fix for this error for probably 2days to no avail in these forums and in Google. After teetering on the borderline of insanity and after a bunch of var_dumps and searching, I was able to locate the issue and fix it (for my site at least ).
This may be different depending on your site and installation, but it is something to take a look at;
In the file wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php, take a look at your data inserts starting somewhere around line 98;
In the original /bp-groups-classes.php file, there is/are only 7 table columns defined, see below
$sql = $wpdb->prepare(
“INSERT INTO {$bp->groups->table_name} (
creator_id,
name,
slug,
description,
status,
enable_forum,
date_created
) VALUES (
%d, %s, %s, %s, %s, %d, %s
)”,
$this->creator_id,
$this->name,
$this->slug,
$this->description,
$this->status,
$this->enable_forum,
$this->date_created
);Depending on what plugins you may be using, this file may have changed and been modified to include additional table columns. In my particular issue, I noticed that there was a “details” column that was added by one of my plugins, when this happened the number of columns changed, but there was never a new format value added for that column.
(For those of you who are not coders and are not sure what format values are, those are those little “%d” or “%s” values. They basically tell the database what kind of info are in those columns; d – data, s – string, or f – float. For more information read over this page http://codex.wordpress.org/Class_Reference/wpdb, and possibly read up on data types in PHP.)
To fix my issue, I simply added another format value and I was able to submit successfully without any issues. If you are running into this problem, I would suggest taking a look at this file and comparing it to a default Buddypress file to see what changed, and then make the necessary modifications.
Hope this helps someone and is useful information.
- The topic ‘Possible Bug Fix: Group Creation error ”There was an error saving group details. Please try again”’ is closed to new replies.