"Not following" a Topic causes it to not be marked Read?

Started by @rjen, May 04, 2022, 06:25:51 AM

Previous topic - Next topic

@rjen

I migrated directly from 2.0.19 to 2.1

Thinks for the link, I will check it later today
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Quote from: shawnb61 on September 20, 2022, 06:03:36 PMThis PR comes to mind, late in the RCs:
https://github.com/SimpleMachines/SMF/pull/6683


Checked the PR, but that does not seem to apply: the PR is releated to the update of table 'smf_log_notify' which holds entries for topics that users DO want to be notified on.

The problem I have is with the setting "Not following" on a topic
You cannot view this attachment.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Got a little further and some result...

The Not following is stored in table smf_log_topics in the column 'unwatched'
Update and all working

In recent.php this table is read.

Now there is something specific:

If there are less then 100.000 messages in the forum the code builds up an internal table called "log_topics_unread" and processes that, if the number of messages exceeds 100.000 another query is used to retrieve the data...

Now my forum has around 300.000 messages, so query 2 is used, and it keeps showing the topics that re 'unwatched' in the unread topics.
Now when I change the threshold value to 1.000.000 messages the functionality works..

So the first query with the internal table  "log_topics_unread" gives the correct result, but the second query, reading the smf_log_topics table does not.

Still hoping that one of the devs can have a look into these functions and explain the different behaviour...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

shawnb61

There was a fix in this area not too long ago:
https://github.com/SimpleMachines/SMF/pull/6908

To:
https://github.com/SimpleMachines/SMF/issues/6907

My initial thought is that the fix addressed the <=100000 but not the >100000.  I'll take a peek.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

I believe I have a fix for this:
https://github.com/SimpleMachines/SMF/pull/7548

I was able to confirm the issue in my test forum, of a similar size (245K posts).

BUT...  Not just by clicking "Unread Posts".  Unread Posts invokes the logic for "RECENT UNREAD TOPICS".  That logic, I think, was working fine.  However, if you subsequently press the button for "ALL UNREAD TOPICS", the issue is visible.  I think this is why this was difficult for folks to reproduce.

I suspect @@rjen has a setting or template tweak somewhere that defaults "Unread Posts" to invoke "ALL UNREAD TOPICS".  I.e.,
/index.php?action=unread;all;start=0 as opposed to
/index.php?action=unread
The 'all;' in the URL is important.

The temporary table used for forums with > 100000 messages is only used when processing "ALL UNREAD TOPICS".

@@rjen - let me know if this addresses the issue!
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

@rjen

I will check today.

I can confirm that we use the all unread instead of the default since last visit: that is indeed a tweak I made..
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Confirmed: I applied your correction and it solves the problem..

Wow, glad you found that one, that took a while...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Steve

Marking solved as a solution to the OP's problem has been provided and submitted for future release.
DO NOT pm me for support!

Dekudibusei

Brilliant! Many thanks, Shawn, hero material indeed!

Advertisement: