Project

General

Profile

Actions

Defect #3356

closed

Sometimes new posts don't show up in the topic list of a forum.

Added by Thomas P. over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Forums
Target version:
Start date:
2009-05-13
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Sometimes, when a user posts a new topic in the forum, it will not show up in the topic list of that forum.
However, the post is shown in the "last post" box on the forums overview.

I could not reproduce it because my (admin) posts show up. But I can see that various posts are not listed for whatever reason.


Files

forumsbug1.tiff (23.4 KB) forumsbug1.tiff Thomas P., 2009-05-13 17:47
forumsbug2.tiff (33.4 KB) forumsbug2.tiff Thomas P., 2009-05-13 17:47
Actions #1

Updated by Jean-Philippe Lang over 15 years ago

Can you post the content of your database:
  • the row of the post that doesn't show up (select * from messages where id=[your message id])
  • the row of the board it belongs to (select * from boards where id=[your board id])

And please give your Redmine revision and database version.

Actions #2

Updated by Thomas P. over 15 years ago

Redmine revision is 2737, database is mysql 5.0.51a-24 (Debian)

id   board_id  parent_id  subject  content author_id  replies_count  last_reply_id created_on           updated_on           locked  sticky
132  2         NULL       lig...   I...    1221       1              1326          2009-05-13 14:49:55  2009-05-13 19:18:48  NULL    NULL
id  project_id  name  description  position  topics_count  messages_count  last_message_id
2   1           Su..  if you n...  1         449           1083            1327
Actions #3

Updated by Stefan B over 15 years ago

sticky NULL is the problem; it is at the end of the list (it should be 0).

Actions #4

Updated by Jean-Philippe Lang over 15 years ago

This field should have a default value of 0 in your database:
source:/trunk/db/migrate/083_add_messages_sticky.rb

Can you check this?

Actions #5

Updated by Stefan B over 15 years ago

Migration script is valid, db/schema.rb too, even checked mysql db:

mysql> describe messages;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
[...]
| sticky        | int(11)      | YES  |     | 0       |                |
+---------------+--------------+------+-----+---------+----------------+

update messages set sticky=0 where sticky is null; fixed the issues temporarily yesterday, but there already new broken topics:

mysql> select id, board_id, parent_id, created_on, updated_on, sticky from messages where sticky is null;
+------+----------+-----------+---------------------+---------------------+--------+
| id   | board_id | parent_id | created_on          | updated_on          | sticky |
+------+----------+-----------+---------------------+---------------------+--------+
| 1340 |        2 |      1328 | 2009-05-14 08:06:48 | 2009-05-14 08:07:42 |   NULL |
| 1341 |        2 |      NULL | 2009-05-14 10:15:43 | 2009-05-14 10:36:46 |   NULL |
| 1345 |        2 |      NULL | 2009-05-14 14:18:48 | 2009-05-14 14:23:50 |   NULL |
+------+----------+-----------+---------------------+---------------------+--------+
3 rows in set (0.00 sec)
Actions #6

Updated by Stefan B over 15 years ago

We hunted the bug...

Create a new topic, reply to it. Edit the reply. => sticky = NULL
Editing the first post works, only editing the reply is broken.

Actions #7

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from New to Closed
  • Target version set to 0.9.0
  • Affected version (unused) changed from devel to 0.8.4
  • Resolution set to Fixed
  • Affected version set to 0.8.4

Fixed in r2787. Thanks for pointing this out.

Actions

Also available in: Atom PDF