Skip to:
Content
Pages
Categories
Search
Top
Bottom

Possible Bug Fix: Group Creation error ”There was an error saving group details. Please try again”


  • DavidWS
    Member

    @davidws

    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. ;)

Viewing 3 replies - 1 through 3 (of 3 total)

  • rich
    Member

    @etivite

    a point to note – there is a group meta table for this reason and should avoid modifying core items.


    Paul Wong-Gibbs
    Keymaster

    @djpaul

    Whatever plugin modified that core table should be shot.


    DavidWS
    Member

    @davidws

    Amen to that, i removed a bunch of them so im not sure which did it, but I noticed it and was like wtf happened here. But now it’s too late to remove it, so *shrugs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible Bug Fix: Group Creation error ”There was an error saving group details. Please try again”’ is closed to new replies.
Skip to toolbar