News:

Join the Facebook Fan Page.

Main Menu

RemoveTopic.php error

Started by w4rkr4f7, October 03, 2015, 09:32:12 AM

Previous topic - Next topic

w4rkr4f7

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

Illori

what error did you get?

i just tried to restore a topic and had no issues.

Oldiesmann

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).
Michael Eshom
Christian Metal Fans

live627


w4rkr4f7

#4
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

Kindred

And have you made any changes to the default code yourself (in any of the files, not just that one)?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

w4rkr4f7

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

Kindred

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?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Oldiesmann

Michael Eshom
Christian Metal Fans

Advertisement: