News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Not All New Posts Show Up In 'Unread Posts'/'All Unread Topics'

Started by Tikkuy, February 02, 2015, 05:32:18 AM

Previous topic - Next topic

Tikkuy

I had a user on my website mention this to me a month or so ago, but I'm now seeing the effects of it myself. We're having an issue where not all new topics are showing up in 'Unread Posts', 'Updated Topics', or 'All Unread Topics'. I would say that around 90% of them are showing up in there, but there's a few new topics that have been made that I personally have completely missed and haven't known existed until I've clicked on the forum they're located in.

Has anyone else had a similiar issue with this? It's only started occuring noticably for me when I updated to 2.1 so guessing it must be an issue with that.

w4rkr4f7

Quote from: Tikkuy on February 02, 2015, 05:32:18 AM
I had a user on my website mention this to me a month or so ago, but I'm now seeing the effects of it myself. We're having an issue where not all new topics are showing up in 'Unread Posts', 'Updated Topics', or 'All Unread Topics'. I would say that around 90% of them are showing up in there, but there's a few new topics that have been made that I personally have completely missed and haven't known existed until I've clicked on the forum they're located in.

Has anyone else had a similiar issue with this? It's only started occuring noticably for me when I updated to 2.1 so guessing it must be an issue with that.

http://www.simplemachines.org/community/index.php?topic=532020.0

Illori

i dont believe that issue is related to what the OP is reporting.

what the OP is reporting is an issue a few team members here have seen on this forum but no one has been able to track down the reason or cause.

Tikkuy

Quote from: Illori on February 05, 2015, 05:25:56 PM
i dont believe that issue is related to what the OP is reporting.

what the OP is reporting is an issue a few team members here have seen on this forum but no one has been able to track down the reason or cause.

You're right, line 820 of Recent.php is looking correct so it's a separate issue. Glad to hear this is a known issue though, I'll look forward to a fix in the future!

Kindred

well, there is no "fix" even on the horizon, because most of us can not reproduce it... and even when it happens, it is not consistent. We have no cause...
Сл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."

margarett

I think I've seen this happening in Bryan's forum, just updated to 2.1

I opened forums main page and the first board had the "new" icon. The last post on the forum was in fact a new post in that board. This was the only new post since my last visit. I clicked "Unread" and I got the message that there were no posts since last visit. All unread posts also produced the same message.
Going back to BoardIndex, the "new" icon in that board is still there, entering said board shows the post as new.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Antes

afaik there is a time limit for new unread topics (action=unread). They'll stay as unread still on forum because you didn't mark them as read (or actually read) but they'll be removed from the list in that action. That's probably for performance, think it as a well established forum with dozens of new topics in a day, and after 2 weeks of absence that query kinda takes some (and multiple it with 1000).

live627

Here's a quick patch to try:

---
Sources/Recent.php | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/Sources/Recent.php b/Sources/Recent.php
index 8f06362..610b8b6 100644
--- a/Sources/Recent.php
+++ b/Sources/Recent.php
@@ -818,7 +817,7 @@ function UnreadTopics()
WHERE t.' . $query_this_board . (!empty($earliest_msg) ? '
AND t.id_last_msg > {int:earliest_msg}' : '') . '
AND IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) < t.id_last_msg' . ($modSettings['postmod_active'] ? '
- AND t.approved = {int:is_approved}' : '') . ' AND lt.unwatched != 1',
+ AND t.approved = {int:is_approved}' : ''),
array_merge($query_parameters, array(
'current_member' => $user_info['id'],
'earliest_msg' => !empty($earliest_msg) ? $earliest_msg : 0,
@@ -893,13 +892,13 @@ function UnreadTopics()
SELECT COUNT(*), MIN(t.id_last_msg)
FROM {db_prefix}topics AS t' . (!empty($have_temp_table) ? '
LEFT JOIN {db_prefix}log_topics_unread AS lt ON (lt.id_topic = t.id_topic)' : '
- LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})') . '
+ LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member} AND lt.unwatched != 1)') . '
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = t.id_board AND lmr.id_member = {int:current_member})
WHERE t.' . $query_this_board . ($context['showing_all_topics'] && !empty($earliest_msg) ? '
AND t.id_last_msg > {int:earliest_msg}' : (!$context['showing_all_topics'] && empty($_SESSION['first_login']) ? '
AND t.id_last_msg > {int:id_msg_last_visit}' : '')) . '
AND IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) < t.id_last_msg' . ($modSettings['postmod_active'] ? '
- AND t.approved = {int:is_approved}' : '') . ' AND lt.unwatched != 1',
+ AND t.approved = {int:is_approved}' : '') . '',
array_merge($query_parameters, array(
'current_member' => $user_info['id'],
'earliest_msg' => !empty($earliest_msg) ? $earliest_msg : 0,
@@ -956,12 +955,12 @@ function UnreadTopics()
LEFT JOIN {db_prefix}members AS mems ON (mems.id_member = ms.id_member)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)' . (!empty($have_temp_table) ? '
LEFT JOIN {db_prefix}log_topics_unread AS lt ON (lt.id_topic = t.id_topic)' : '
- LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})') . '
+ LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member} AND lt.unwatched != 1)') . '
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = t.id_board AND lmr.id_member = {int:current_member})
WHERE t.' . $query_this_board . '
AND t.id_last_msg >= {int:min_message}
AND IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) < ml.id_msg' . ($modSettings['postmod_active'] ? '
- AND ms.approved = {int:is_approved}' : '') . ' AND lt.unwatched != 1
+ AND ms.approved = {int:is_approved}' : '') . '
ORDER BY {raw:order}
LIMIT {int:offset}, {int:limit}',
array_merge($query_parameters, array(

live627

Quote from: Antes on February 21, 2015, 03:34:49 PM
afaik there is a time limit for new unread topics (action=unread). They'll stay as unread still on forum because you didn't mark them as read (or actually read) but they'll be removed from the list in that action. That's probably for performance, think it as a well established forum with dozens of new topics in a day, and after 2 weeks of absence that query kinda takes some (and multiple it with 1000).
The post in question was made today.

margarett

Yes it was

Just repeated the same issue, with the same symptoms in the same forum. New post was in a different board this time.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

live627


I B D


margarett

If it serves as a bug test, I was now able to use "unread" correctly at Bryan's

It would be nice if Tikkuy could try it also ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair


Tikkuy

Stupid question, but how do we actually apply that patch? Is it done manually through FTP?

margarett

Yes,

You need to edit Sources/Recent.php, remove the lines marked with a "-" in the beginning and replace them with the lines marked with a "+"

Or attach the file, I'll gladly do it for you ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Tikkuy

Quote from: margarett on February 24, 2015, 02:56:00 AM
Yes,

You need to edit Sources/Recent.php, remove the lines marked with a "-" in the beginning and replace them with the lines marked with a "+"

Or attach the file, I'll gladly do it for you ;)

Aha, got it! Thanks so much for letting me know and coming up with a hopeful fix. ;) I can't really say 100% whether it's worked or not, as at least on my forum the problem to begin with was pretty sporadic, but I'll try it out and let you know how it goes. :)

Advertisement: