Hitting the back button from a topic shows the unread count even when not tracking topic

Steps to reproduce:

  1. From the Latest page, open any topic that has more than just a few posts (so that opening the topic doesn’t mark them all as read)
  2. Hit the browser back button

Notice the unread count next to the topic that you just opened. You are not actually tracking the topic, and refreshing the page makes the count go away. This also happens if you start from the Categories and Top pages. I haven’t tried any other page as a starting point.

Interestingly, the unread count shown isn’t even accurate and is actually greater than the total number of posts in the topic.

3 Likes

This is a great report and I have repro as well, looks like the back button is causing us to corrupt topic-tracking-state and that we are updating it despite the topic not being a tracked topic. (also I wonder if the corruption started earlier when you were looking at the topic)

@tgxworld it is very possible this is one of those bugs you were tracking down

3 Likes

This is not related to topic tracking state because topic tracking state deals with the count of unread/new topics but not the number of unread counts within a topic. I did some digging and this is caused by

Basically, unread post counts for a topic should only be set when the user’s notification level of a given topic is tracking or higher which the current code added by the PR did not consider.

I have an initial fix but I need to write tests for it before I push a PR up.

4 Likes

This will be fixed in

Thank you for reporting @seanblue

3 Likes

This topic was automatically closed after 9 days. New replies are no longer allowed.