Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: TheMBC on July 28, 2008, 10:42:48 PM

Title: Mods can't merge topics.
Post by: TheMBC on July 28, 2008, 10:42:48 PM
The moderators of the forum I help run cannot merge topics, it seems to be happening to Global Moderators and regular Moderators.  I don't know what the problem is.  Here's a screenshot of the error.

Any help will be greatly appreciated.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi66.photobucket.com%2Falbums%2Fh263%2FMelovespie%2FDatabaseValue.png&hash=bbdfb1eac1cd2ca7756405277e969fb52a23d46d)


It says: "The database value you're trying to insert does not exist: is_approve"
Title: Re: Mods can't merge topics.
Post by: ccbtimewiz on July 28, 2008, 11:38:51 PM
Did you install any modifications? Do you get any errors in the error log?
Title: Re: Mods can't merge topics.
Post by: TheMBC on July 30, 2008, 01:20:45 AM
Yes, we have some modifications, but none are applied that aren't compatible with SMF 2.0 as far as I know.

This showed up in the critical section of the error log...what's colored out is his IP address.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg520.imageshack.us%2Fimg520%2F4162%2Ferrordb2.th.png&hash=9aa3b19da9a6eb5f38ec99cfd3becc7e8e8cf174) (http://img520.imageshack.us/my.php?image=errordb2.png)

Here's what's on line 915, the code starts at line 900 and ends on 925:
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
WHERE t.id_board = {int:id_board}
AND t.id_topic != {int:id_topic}' . ($onlyApproved ? '
AND t.approved = {int:is_approved}' : '') . '
ORDER BY {raw:sort}
LIMIT {int:offset}, {int:limit}',
array(
'id_board' => $_REQUEST['targetboard'],
'id_topic' => $_GET['from'],
'sort' => (!empty($modSettings['enableStickyTopics']) ? 't.is_sticky DESC, ' : '') . 't.id_last_msg DESC',
'offset' => $_REQUEST['start'],
'limit' => $modSettings['defaultMaxTopics'],
)
);
$context['topics'] = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
censorText($row['subject']);

$context['topics'][] = array(
'id' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
Title: Re: Mods can't merge topics.
Post by: Rumbaar on August 04, 2008, 07:59:42 AM
What mods do you have installed?  What changed?  Were they ever able too?  Can you attach your whole file, as it appears some modifications inside the file have shift the code from the normal line numbers.