Re: Moving single posts |
Tue, 09 January 2007 09:31 |
|
Ernesto wrote on Tue, 09 January 2007 07:38 | Instead of topic ID, make a list of topics, just as on the thread page, showing the default number of topics per page.
Make it a stairway selection - First categroy (subcategory) and then list the topics, X per page. Only need to list topic title, topic starter and date.
|
That's way too complex.
|
|
Re: Moving single posts |
Tue, 09 January 2007 09:33 |
|
JanRei wrote on Mon, 08 January 2007 18:12 | I understand your point. But I think selecting the target topic via its ID is likely to produce mistakes. I also don't know if your way is more pratical because the topic ID is nowhere displayed in the forum and moderators would have to study the link to a topic to get the ID from there.
There seem to be some problems with your implementation. I have tried to give in a invalid ID (a topic ID that does not exist) and I got to blank page. The reason seems to be the following error:
Quote: | PHP Fatal error: Call to undefined function check_return() in C:\xampp\htdocs\forum\theme\default\movemsg.php on line 363
|
Then I tried to move messages while only being a moderator and I got a blank page instead of the moving messages menu. The problem seems to be the following querry error:
Quote: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\index.php:171
C:\xampp\htdocs\forum\theme\default\movemsg.php:338
C:\xampp\htdocs\forum\index.php:1194
) 1064: 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 '' at line 5
Query: SELECT mm.id, COALESCE(g2.group_cache_opt, g1.group_cache_opt) AS gco FROM fud26_thread t LEFT JOIN fud26_mod mm ON mm.user_id=3 AND mm.forum_id=t.forum_id INNER JOIN fud26_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id=t.forum_id LEFT JOIN fud26_group_cache g2 ON g2.user_id=3 AND g2.resource_id=t.forum_id WHERE t.id=
_GET: array ( 't' => 'movemsg', 'th' => '1', )
Server Version: 5.0.21-community-nt
[Referring Page] http://localhost/forum/index.php?t=msg&th=1&start=0&S=20b6e6d08 675aed8e6442e7d3e57fd67
|
I also found the following warning in my error log, but I don't know under what condition it occurs:
Quote: | PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in C:\xampp\htdocs\forum\theme\default\movemsg.php on line 390
|
|
Both of the described issues are now fixed in CVS.
|
|
Re: Moving single posts |
Tue, 09 January 2007 14:37 |
|
_wj_ wrote on Tue, 09 Januar 2007 11:35 |
JanRei wrote on Sat, 06 January 2007 20:36 | First I would like to suggest that the topic hasn't be to selected by giving in the topic ID. I think that this makes it easy to make mistakes/typos and moving the messages to a wrong topic.
|
I have experience with such a method on our old handmade forum and I want to say, that's pretty comfortable. I've never had a mistakes. Moderator just have to be little attentive, that's all
|
I really hope that there will be no mistakes, because if you do one you can't fix easily. I have thought of a optional check of the forum and topic name for the case you aren't sure. But I don't know whether this is a good idea.
And by the way, how do you find out the topic ID, via the url to the topic?
|
|
Re: Moving single posts |
Tue, 09 January 2007 15:18 |
|
Ilia wrote on Tue, 09 Januar 2007 15:33 |
Both of the described issues are now fixed in CVS.
|
Great, I have applied the patch and it works indeed. But what's about the warning about in_array (now in line 409), can it be ignored?
When I want to move messages to a deleted topic, I get "You do not have the required permissions to perform this action". I was a little bit surprised since I was a admin at this time.
And the forum seems to have some problems with the message/topic counting:
When I move messages to a topic that is in another forum, the topic count on the index page doesn't seem to get updated.
When I move all messages of a topic to another I get a empty topic with "-1" replies (according to the topic listing).
|
|
Re: Moving single posts |
Wed, 10 January 2007 06:38 |
|
JanRei wrote on Tue, 09 January 2007 21:37 | And by the way, how do you find out the topic ID, via the url to the topic?
|
Yes, via the url.
|
|
Re: Moving single posts |
Wed, 10 January 2007 11:06 |
|
Can you show me a warning, the warning really should not exist unless you somehow found a topic without any messages in it, which is technically impossible.
I fixed the error on a not-found topic to be non-permission related to prevent confusion.
Can you make sure all your message moving code is up to date with CVS and see if you still encounter the counter problem. I do not appear to have it here locally.
|
|
Re: Moving single posts |
Thu, 11 January 2007 16:58 |
|
I now installed the latest CVS version. And I can still reproduce all issues.
I was a bit surprised that I still get the permission error when I try to move the messages to a deleted topic. And yes I have checked that I use the same version of movemsg.php as it is in CVS.
The problem with "-1" replies is also still there. And I am getting the warning because the topic has really no messages in it (I have attached a screenshot of the topic). To get this I made a topic with two messages and moved both of them to another topic.
And I can still reproduce the wrong message counting on the index page after moving messages to a topic that is in another forum. The counting doesn't seem to get updated afer moving messages.
|
|
|
Re: Moving single posts |
Fri, 12 January 2007 11:02 |
|
Now I get some query errors:
Quote: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\theme\default\movemsg.php:415
C:\xampp\htdocs\forum\index.php:1194
) 1054: Unknown column 'last_post_date' in 'field list'
Query: UPDATE fud26_forum SET post_count=post_count+2, last_post_date=1168616130, last_post_id=3, last_post_id=3 WHERE id=2
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => 'e59c8cd9c612d21b06de0a0b8c198bed', 'SQ' => '0c321c58dbaca399f964cd14cb5effb2', 'th' => '1', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '1', 1 => '3', ), )
Server Version: 5.0.21-community-nt
[Referring Page] http://localhost/forum/index.php?t=movemsg
|
Quote: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\theme\default\movemsg.php:439
C:\xampp\htdocs\forum\index.php:1194
) 1064: 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 '0) WHERE id=1' at line 1
Query: UPDATE fud26_forum SET post_count=MAX(post_count-1,0) WHERE id=1
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => 'e59c8cd9c612d21b06de0a0b8c198bed', 'SQ' => '6e29e03d399f6fd42cd892e474fec1a9', 'th' => '2', 'dest_th' => '1', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '1', ), )
Server Version: 5.0.21-community-nt
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=2
|
|
|
|
Re: Moving single posts |
Sun, 14 January 2007 14:57 |
|
I still get the first query error:
Zitat: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\theme\default\movemsg.php:415
C:\xampp\htdocs\forum\index.php:1194
) 1054: Unknown column 'last_post_date' in 'field list'
Query: UPDATE fud26_forum SET post_count=post_count+2, last_post_date=1168798990, last_post_id=7, last_post_id=7 WHERE id=2
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => '69f262f1b06aee9a9f211da37f01ea37', 'SQ' => '244967d5871f0716cbb08ab06e37492a', 'th' => '3', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '6', 1 => '7', ), )
Server Version: 5.0.27-community
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=3
|
And this one seems to be new:
Zitat: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\index.php:135
C:\xampp\htdocs\forum\theme\default\movemsg.php:423
C:\xampp\htdocs\forum\index.php:1194
) 1146: Table 'fudforum.fud26__tv_1' doesn't exist
Query: SELECT t.last_post_id FROM fud26__tv_1 v INNER JOIN fud26_thread t ON t.id=v.thread_id WHERE tv_seq=1
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => '69f262f1b06aee9a9f211da37f01ea37', 'SQ' => '3a5da9b27ecf6ab5a254537b857f4135', 'th' => '1', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '1', 1 => '2', ), )
Server Version: 5.0.27-community
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=1
|
|
|
|
Re: Moving single posts |
Tue, 16 January 2007 12:51 |
|
And what is about the first query error? I get it when I try to move all messages of a topic (select all checkboxes).
When I move messages from one forum to another this movement is not reflected in the message counting on the index page (where the forums are listed).
|
|
|
Re: Moving single posts |
Fri, 19 January 2007 09:54 |
|
This error message seems to be indeed fixed but now I get this one:
Zitat: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\index.php:135
C:\xampp\htdocs\forum\theme\default\movemsg.php:423
C:\xampp\htdocs\forum\index.php:1194
) 1054: Unknown column 'tv_seq' in 'where clause'
Query: SELECT t.last_post_id FROM fud26_tv_1 v INNER JOIN fud26_thread t ON t.id=v.thread_id WHERE tv_seq=1
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => 'ff7e157685c4a03340e93ca6c3dfa3a9', 'SQ' => '7065928e7bc2eb130cc3a34f32be1a64', 'th' => '1', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '1', 1 => '2', ), )
Server Version: 5.0.27-community-nt
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=1
|
|
|
|
Re: Moving single posts |
Sat, 20 January 2007 08:21 |
|
Now I get this:
Zitat: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\theme\default\movemsg.php:439
C:\xampp\htdocs\forum\index.php:1194
) 1064: 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 ' 0), last_post_id=3 WHERE id=1' at line 1
Query: UPDATE fud26_forum SET post_count=post_count-2, thread_count=MAX(thread_count-1, 0), last_post_id=3 WHERE id=1
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => 'ceb602c425f71492f019bcae37349b7f', 'SQ' => '4d6886e938910bc3a31b8d0653b26383', 'th' => '1', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '1', 1 => '2', ), )
Server Version: 5.0.27-community-nt
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=1
|
|
|
|
Re: Moving single posts |
Sun, 21 January 2007 14:58 |
|
Hm, I always do a clean install of FUDforum using latest CVS when testing this feature.
I have tested your change and I get the following error:
Zitat: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\theme\default\movemsg.php:439
C:\xampp\htdocs\forum\index.php:1194
) 1064: 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=2' at line 1
Query: UPDATE fud26_forum SET post_count=post_count-2, thread_count=thread_count-1, last_post_id= WHERE id=2
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => '0e2becf197b741021f0a8c1768aede99', 'SQ' => 'c596a0a3c0aa31b708df224e1bbcc9d6', 'th' => '1', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '1', 1 => '2', ), )
Server Version: 5.0.27-community-nt
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=1
|
|
|
|
Re: Moving single posts |
Tue, 23 January 2007 07:13 |
|
Yes, this is correct the source forum had only 1 topic. And the query error is now fixed.
But I have still the problem that the message count is not updated when I move messsages from one forum to another.
I have attached a screenshot showing that the message count can't be correct.
And also got this error once:
Quote: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\theme\default\movemsg.php:415
C:\xampp\htdocs\forum\index.php:1194
) 1054: Unknown column 'last_post_date' in 'field list'
Query: UPDATE fud26_forum SET post_count=post_count+1, last_post_date=1169552320, last_post_id=6, last_post_id=6 WHERE id=2
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => '100ce165449929e23bc3d31e3fecc4e5', 'SQ' => 'baa1a12cb72cda4b3fc790385ade9a7a', 'th' => '4', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '6', ), )
Server Version: 5.0.27-community-nt
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=4
|
|
|
|
Re: Moving single posts |
Wed, 24 January 2007 13:56 |
|
The problem with updating the message count on the index page still exists.
And there is a new problem:
I move all messages in a topic to another (the target topic is in another forum). After the operation I can't access the new topic, because I get "You have followed an invalid link. Please notify the webmaster how you got here."
In my error log I found this, maybe this is related to this:
Quote: | PHP Notice: Undefined index: msg_tdescr in C:\xampp\htdocs\forum\theme\default\post.php on line 4009
PHP Notice: Undefined variable: msg_tdescr in C:\xampp\htdocs\forum\theme\default\post.php on line 4341
|
|
|
Re: Moving single posts |
Wed, 24 January 2007 18:57 |
|
The variable thing should be fixed. As far as topic access, have you tried running the consistency checker?
|
|
Re: Moving single posts |
Thu, 25 January 2007 02:48 |
|
Yes, running consistency checker fixes both the message count and the topic access.
|
|
Re: Moving single posts |
Thu, 25 January 2007 13:16 |
|
Small update, I think I found the error message that is related to the problem with topic access. Maybe it helps to find a solution to it.
Quote: | PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in C:\xampp\htdocs\forum\theme\default\movemsg.php on line 426
|
|
|
|
Re: Moving single posts |
Fri, 26 January 2007 06:47 |
|
Yes, I can't find any php errors in my log anymore.
But unfortunately it doesn't fix the problems regarding moving complete topics from one forum to another (wrong message counting and no access to destination topic). Can you have look what's wrong here?
|
|
|
Re: Moving single posts |
Tue, 30 January 2007 16:51 |
|
I tried it, but now I get this:
Quote: | (C:\xampp\htdocs\forum\index.php:75
C:\xampp\htdocs\forum\index.php:135
C:\xampp\htdocs\forum\theme\default\movemsg.php:2359
C:\xampp\htdocs\forum\index.php:1194
) 1064: 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 '' at line 1
Query: SELECT root_msg_id FROM fud26_thread WHERE id=
_GET: array ( 't' => 'movemsg', )
_POST: array ( 'S' => '0e519397384711fa13bbfce6f18f7b2a', 'SQ' => 'a2be1f3bbf4602b9470f4defb3a4a0d7', 'th' => '1', 'dest_th' => '2', 'btn_selected' => 'Move Selected Messages', 'msg_ids' => array ( 0 => '1', 1 => '2', ), )
Server Version: 5.0.27-community-nt
[Referring Page] http://localhost/forum/index.php?t=movemsg&th=1
|
|
|
|
Re: Moving single posts |
Thu, 01 February 2007 16:06 |
|
The query error is solved, but it still doesn't work correctly.
But there are still problems left:
1) The message count on the index page doesn't seem to get updated when I move messages to another forum.
2) When I move a complete topic the destination topic doesn't appear on the topic listing anymore. I can bring it back by running consistency checker, but the forum seems to lose the fist message of the source topic.
|
|
Re: Moving single posts |
Thu, 01 February 2007 18:57 |
|
When you move the 1st message in the topic you effectively destroy the source topic.
|
|
Re: Moving single posts |
Fri, 02 February 2007 01:01 |
|
I don't understand your answer. Moving the first message of a topic works, but moving a complete topic doesn't work (as I described).
|
|
Re: Moving single posts |
Sun, 04 February 2007 11:41 |
|
The topic is very much tied to the 1st message, internally referred to as the root message. When this message goes away, the topic goes away with it, since all the checks and determinations, such as topic's subject are determined based upon.
The functionality introduced is by no means a replacement for "merge topic" feature that is already present, which is what you should be using when trying to move all messages from topic X to topic Y.
|
|
Re: Moving single posts |
Sun, 04 February 2007 12:12 |
|
I don't agree with this explanation. It's the destination topic that vanishes and its root message is not touched.
The root message is removed from the source topic. And this message is not removed by me but by the forum.
|
|
Re: Moving single posts |
Thu, 08 February 2007 15:27 |
|
Are you going to change the behaviour of this feature, Ilia? I would appreciate if you could consider it.
|
|
|
|