Hi ,if I try to restore a message from Recycle Bin is giving me a error at line 1311 and message is not moving.
I have replaced in RemoveTopic.php
// Time to move the messages.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET
id_topic = {int:target_topic},
id_board = {int:target_board},
WHERE id_msg IN({array_int:msgs})',
array(
'target_topic' => $target_topic,
'target_board' => $target_board,
'msgs' => $msgs,
)
);
with:
// Time to move the messages.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET
id_topic = {int:target_topic},
id_board = {int:target_board},
icon = {string:icon}
WHERE id_msg IN({array_int:msgs})',
array(
'target_topic' => $target_topic,
'target_board' => $target_board,
'icon' => $target_board == $modSettings['recycle_board'] ? 'recycled' : 'xx',
'msgs' => $msgs,
)
);
Now message is moving and no more errors...
what error did you get?
i just tried to restore a topic and had no issues.
I can't see how that change would fix an error unless the icon column was empty for some reason (which should never happen to begin with).
What is the error?
Quote from: live627 on October 04, 2015, 06:38:47 PM
What is the error?
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id_msg IN(19)' at line 5
File: /home/public_html/Sources/RemoveTopic.php
Line: 1311
And have you made any changes to the default code yourself (in any of the files, not just that one)?
Quote from: Kindred on October 05, 2015, 09:59:03 AM
And have you made any changes to the default code yourself (in any of the files, not just that one)?
If I'm changing codes posted on first message of this topic error is gone and topic is moved ,anyway I just posted that just for other users having same error (maybe I'm only one with bad luck..)
you have missed the point of my question.
You ahve reported a bug.
Per Oldiesmann -- your edit should have no effect unless the icon column was empty.
That should never happen.
We can not recreate your error on a clean installation.
So... you are encountering and error that should not happen and can not be recreated...
I am asking you -- have you edited ANY of the files for 2.1beta2? Not just the "fix" which you posted above --- have you made ANY OTHER EDITS - TO ANY FILE?
Extra comma on the line highlighted https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/RemoveTopic.php#L1304
Fixed on GitHub: https://git.io/vCgGD