- Code: Select all
General Error
Could not insert new group
DEBUG MODE
SQL Error : 1136 Column count doesn't match value count at row 1
INSERT INTO forum_groups (group_type, group_name, group_description, group_moderator, group_allow_pm, group_single_user) VALUES (1, 'test', 'test2', 2, '5' '0')
Line : 385
File : [path to server]/forum/admin/admin_groups.php
Here is the relevant section of admin_groups.php:
- Code: Select all
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator, group_allow_pm = '$group_allow_pm'
WHERE group_id = $group_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql);
}
$message = $lang['Updated_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . append_sid("admin_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');;
message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == 'newgroup' )
{
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_allow_pm, group_single_user)
VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '$group_allow_pm' '0')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);
}
$new_group_id = $db->sql_nextid();
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES ($new_group_id, $group_moderator, 0)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new user-group info', '', __LINE__, __FILE__, $sql);
}
$message = $lang['Added_new_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . append_sid("admin_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');;
message_die(GENERAL_MESSAGE, $message);
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_group_action']);
Note: line 385 itself is the
- Code: Select all
message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);
line, but I assume it refers to the instruction before that.
I also have the calendar pro mod installed (which adds a 'group_calendar_perm' field to the forum_groups table), but have talked with the author who was sure it was not a fault with the calendar mod.
Any help to solve this problem would be very much appreciated.
Thank you in advance.
---
planneroftowns.

