Skip to main content
Topic: New icons wrong on multipage posts (Read 5829 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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".
Bugs creator.
Features destroyer.
Template killer.

Re: New icons wrong on multipage posts

Reply #2
I *think* this is also common with sub-boards. 

You may have read everything but until you click on the sub board itself, it does not clear the new posts indicator.  But that's not the new icon so ... never mind me :P
Be safe, Be kind, Happy Programing

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 #9
I think it's the default from SMF... It's explained in the topic I linked as well ;)
~ SimplePortal Support Team ~

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...
~ SimplePortal Support Team ~

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.

Re: New icons wrong on multipage posts

Reply #13
Oh alright, it's indeed confusing. I think I remember it but just partially so we'd better for wait da big guyz to explain us :)
~ SimplePortal Support Team ~

Re: New icons wrong on multipage posts

Reply #14
I'm asking what is the difference between "new" and "unread" in SMF speak.
I think I explained it somewhere else, though at the moment I'm trying to answer an email without finding the words to, so I have time to chat about it. :P

Actually, I'm not entirely sure what the question is because I'm a little sleepy and my head is numb due to the hot temperature. So I'll just describe some of the uses of "new" and "unread" around here, if I miss the one you are referring to feel free to tell me, I'll add some more tomorrow. ;D

"new" and "unread" can have different meanings depending on the context.
When you look at the message index (i.e. the content of a board) and you see the little "new" next to a message, that means that you have not read all the messages in that topic, so it is basically the same as "unread".

Another meaning has the "new" in the "new posts" menu above (that is partially shared with the "new posts" title of the icon next to the board name in the board index), in that case "new" means "from your last visit" (session-based), and you can see the case there are no "new posts", but clicking the "all unread" you get some messages.

Usually the icon next to the board name on the board index is also the most confusing and inconsistent.
Why? Because it actually has three meanings:
1) the status (the color and the title text) is defined by a flag in a table that checks if you have "entered" the board;
1a) the status is changed only if you directly enter the board, so if you clicked on a link pointing to ?board=x.yy, or for example on the last message of that board with the "boardseen" parameter in the url,
1b) if you enter a topic belonging to that board (but from an url without the "boardseen" parameter, for example from the info center) then the board is not "marked as read" and will show "new posts" even though there is not a single unread message in there;
2) if you click on the image then you are brought to an "action=unread;board=1.0;children" address, this address shares the same meaning of "new" of the "new posts" menu, so posts from last access (session-based), that means it may be there is a "new posts" icon, but clicking on it the list is empty and sends you to the "all unread" that may show something (older than your session);
3) ... I forgot while writing... darn hot!

I'm pretty sure there is more, but at the moment I may have missing something...
Bugs creator.
Features destroyer.
Template killer.