https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-05-13T16:22:31ZRedmineRedmine - Defect #3356: Sometimes new posts don't show up in the topic list of a forum.https://www.redmine.org/issues/3356?journal_id=92142009-05-13T16:22:31ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul>Can you post the content of your database:
<ul>
<li>the row of the post that doesn't show up (select * from messages where id=[your message id])</li>
<li>the row of the board it belongs to (select * from boards where id=[your board id])</li>
</ul>
<p>And please give your Redmine revision and database version.</p> Redmine - Defect #3356: Sometimes new posts don't show up in the topic list of a forum.https://www.redmine.org/issues/3356?journal_id=92242009-05-13T19:42:21ZThomas P.
<ul></ul><p>Redmine revision is 2737, database is mysql 5.0.51a-24 (Debian)</p>
<pre>
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
</pre>
<pre>
id project_id name description position topics_count messages_count last_message_id
2 1 Su.. if you n... 1 449 1083 1327
</pre> Redmine - Defect #3356: Sometimes new posts don't show up in the topic list of a forum.https://www.redmine.org/issues/3356?journal_id=92282009-05-13T20:25:34ZStefan B
<ul></ul><p>sticky NULL is the problem; it is at the end of the list (it should be 0).</p> Redmine - Defect #3356: Sometimes new posts don't show up in the topic list of a forum.https://www.redmine.org/issues/3356?journal_id=92492009-05-14T16:24:24ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>This field should have a default value of 0 in your database:<br /><a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/db/migrate/083_add_messages_sticky.rb">source:/trunk/db/migrate/083_add_messages_sticky.rb</a></p>
<p>Can you check this?</p> Redmine - Defect #3356: Sometimes new posts don't show up in the topic list of a forum.https://www.redmine.org/issues/3356?journal_id=92592009-05-14T19:28:14ZStefan B
<ul></ul><p>Migration script is valid, db/schema.rb too, even checked mysql db:</p>
<pre>
mysql> describe messages;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
[...]
| sticky | int(11) | YES | | 0 | |
+---------------+--------------+------+-----+---------+----------------+
</pre>
<p><code>update messages set sticky=0 where sticky is null;</code> fixed the issues temporarily yesterday, but there already new broken topics:</p>
<pre>
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)
</pre> Redmine - Defect #3356: Sometimes new posts don't show up in the topic list of a forum.https://www.redmine.org/issues/3356?journal_id=93572009-05-18T16:45:33ZStefan B
<ul></ul><p>We hunted the bug...</p>
<p>Create a new topic, reply to it. Edit the reply. => sticky = NULL<br />Editing the first post works, only editing the reply is broken.</p> Redmine - Defect #3356: Sometimes new posts don't show up in the topic list of a forum.https://www.redmine.org/issues/3356?journal_id=97592009-06-14T09:20:11ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Target version</strong> set to <i>0.9.0</i></li><li><strong>Affected version (unused)</strong> changed from <i>devel</i> to <i>0.8.4</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li><li><strong>Affected version</strong> set to <i>0.8.4</i></li></ul><p>Fixed in <a class="changeset" title="Fixed: editing a message may cause sticky attribute to be NULL (#3356)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2787">r2787</a>. Thanks for pointing this out.</p>