New icons wrong on multipage posts
So I've seen this a lot on my forum, and just saw it here so now I know it's not unique to my setup. If I go to "new" posts in a topic and that topic has enough new posts that the first one it takes me to is not on the last page and I read all the way to the end using the next page button then when I go back to the forum index the board containing the topic is still marked as having unread posts even though there aren't any.
Something about going to the next page is not properly updating the "new" display. I tried a few experiments with my home setup a while ago using really short pages and had trouble reproducing it. My home setup doesn't use any kind of caching. It's possible this is caching problem but the experiments were not thorough enough so I don't make that statement definitively.
The new can be cleared by going back into that topic, and I think by going into the board containing the topic but I'm not 100% certain on that as I don't typically go into boards.
Re: New icons wrong on multipage posts
Reply #1 –
If I read it correctly, this is the ooooooooold SMF behaviour kicking in.
Boards are marked "as read" only and only if you either open the board, or click on the latest message on the board index. Any other way to reach an unread topic will result in not marking the board as read (because you didn't "enter" the board specifically, but you read a topic if it makes sense).
Now, this behaviour has few merits, but is frequently misunderstood as broken, so I guess it should be improved.
Fix it "properly" requires at least another query I think anywhere there is a board, or a db schema change storing somewhere the number of unread topics in a board for each user.
On my forum I have "the query", along with a new "state" of the boards that can be summarized in "you have entered the board, but you still have unread messages".
Re: New icons wrong on multipage posts
Reply #3 –
I guess I don't see any merit to having a board tell me there are new posts in it when there aren't. Whether I read them by entering that board or not. I believe it does happen with sub-boards too.
Re: New icons wrong on multipage posts
Reply #5 –
Hmm. Somehow I missed this reply until you pointed it out in the count unread thread. I'll have to take a look at it. Thanks.
Re: New icons wrong on multipage posts
Reply #6 –
Wow. Looking at that mod the "new" posts logic is byzantine. It certainly isn't a model I would have ever chosen. Explains some other what to me is odd behavior I've seen. I simply don't understand the model SMF and by extension elkarte built in terms of "new" posts. I've never understood the "new posts" vs "All Unread" logic either. On my forum I just ditched the new posts button and replaced it with the all unread as I don't really understand how it decides what is "new".
For example, looking at the code and then testing to see if it was true, if a board says "new" at the board index, and I click the "go to last post" button from the board index for that board (as opposed to the new icon), it not only takes me the last post in that topic but it also marks the entire board as having no new posts regardless of how many other (formerly) new posts are still in that board.
I guess I prefer a simple "unread = new" model. That's not what SMF/elkarte uses though. Honest question, can someone explain the model they do use and how it is helpful?
Regardless of the model though, the fact that I can go from "All unread, to a post, to another (and final) page of the post, to the board index and have the board say there are still new posts when I have in fact read them all (i.e. there are neither new nor unread posts) is still a bug. Especially since I can clear it (sometimes) by going back to the "All unread" page again and then back to the forum. This all seems to stem from the complexity of the new != unread model.
Re: New icons wrong on multipage posts
Reply #8 –
Yes, thank you. The "new" post code is more distributed and complicated that I would have expected. I'm hoping Spuds or Ema can explain what the model for "new" is supposed to be.
Re: New icons wrong on multipage posts
Reply #10 –
I'm asking what is the difference between "new" and "unread" in SMF speak.
Re: New icons wrong on multipage posts
Reply #11 –
Ooh, hmm, there is none as far as I know...
Re: New icons wrong on multipage posts
Reply #12 –
There definitely is. Otherwise "New Posts" and "All Unread Posts" wouldn't exist as separate calls.
The page describing the mod say it's to fix going to a board removing it's "new" even if you don't read the new posts. I'm not 100% confident it will fix the page turning bug I reported as there are so many conditionals in front of where this code is called and I don't know when they're all set or if this code will be called. It is more concerned with making sure "new" remains set when there are more posts not making sure it's cleared when there aren't any.