nuclearw wrote:I've been using bb3 for a few months now, I love this module. One bug i noticed was when moving or deleting posts I get the following error:
SQL ERROR [ mysqli ]
Unknown column 'topic_id' in 'where clause' [1054]
SQL
UPDATE phpbb_post_revisions SET forum_id = 2 WHERE topic_id = '1467'
BACKTRACE
does post_id = topic_id ?
I don't even recognize that SQL statement. I searched through all the PHP and I never see the POST_REVISIONS_TABLE in an SQL statement that contains an UPDATE or a SET forum_id.
Can you provide more information? I have not been able to get this bug to happen, no matter how many times I edit then move or delete posts and/or topics. Do you have other MODs installed that changed some SQL statements? The code that handles deletion is in "includes/functions_admin.php":
Code: Select all
$table_ary = array(POSTS_TABLE, REPORTS_TABLE);
//-- mod: Prime Post Revisions ----------------------------------------------//
$table_ary[] = POST_REVISIONS_TABLE; // To delete the post's edit history
//-- end: Prime Post Revisions ----------------------------------------------//
foreach ($table_ary as $table)
{
$sql = "DELETE FROM $table
WHERE " . $db->sql_in_set('post_id', $post_ids);
$db->sql_query($sql);
}
unset($table_ary);
Check and see if anything has been modified near that point.