Interesting bug with the 'new/unread posts' feature

Interesting bug with the 'new/unread posts' feature

General — Page [1]
phoenix_r

2009 May 13 • 902
17 ₧
So you browse your merry little way over to the supes forum, where you are stylishly logged in. You are presented with yellow boxen next to various subforum names informing you that there are new trucks and/or posts in that subforum. So you browse on and read the shit out of those trucks and/or posts. Then you go back to the main forum page and lo and behold, the box is still there! Click one more time on the subforum, confirm that nobody posted anything since you last viewed the subforum, and then go back to the main forum page. At that point the box is gone, as well it should be. Perhaps this flag is being set a bit late, on a poor condition, or some places where it should be checked are being missed. I'm not sure if it only happens when you go to the main page straight from a truck, or if it also happens going from the subforum to the main page. THANKS. m(*u*)m

EDIT: posting this thread reminded me of another aspect of this. The yellow boxen occur even when the only new truck/post was made by you. After my initial post of the above, I went back to the main page of the forum and BAM, yellow box next to 'Requests.' I know I posted, I hardly need a yellow box confirming it. DOUBLE THANKS.
BOO
 
 
2010 Oct 8 at 10:22 PDT — Ed. 2010 Oct 8 at 10:25 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
I imagine the forumses don't know that you haven't seen all the posts because the function that checks that is only called at a certain point, or at certain times. For instance, I browse using the back buttons on my mouse, because it's easier. But sometimes the pages don't load properly, something something something. Also sometimes if you spend too long on the post screen the yellow squares disappear.
 
 
2010 Oct 8 at 16:02 PDT
Jake?!

2008 Sep 2 • 198
34 ₧
I can verify this has happened to me
?!
 
 
2010 Oct 11 at 14:18 PDT
SuperJer
Websiteman

2005 Mar 20 • 6294
Yes, yes. It is borken.

It turns out it is really hard to do this stuff correctly.

Well, correctly and efficiently.

The inefficient way is to store, for every user, the read/not-read status of every single truck/post. Obviously that's a bit too much data to sling around and do lookups on.

So instead it only stores the timestamp of your most recent viewing of each truck and each area since you logged in. If there's posts newer than your last-viewed timestamp in the truck or area, you get the yellow box.

So it needs a lot of work to be smarter.

I can fix the your-own-posts-make-trucks-yellow problem by updating the last-viewed timestamp when you post, but then it will miss if someone slipped in before you.

The areas-are-yellow-until-you-click-them problem is a bitch. I don't want the forams to have to read through all the trucks in the DB to get the right status. I have to come up with something clever.

(I actually didn't know any of this until I just now dug around in my $_SESSION. I wrote all this code many years ago.)
 
 
2010 Oct 11 at 14:59 PDT
buq25

2008 Jul 5 • 582
295 ₧
superjer said:
I actually didn't know any of this until I just now dug around in my $_SESSION. I wrote all this code many years ago.

If that wouldn't have been there, I would have feared. A nerd isn't somebody who can program alot, a nerd is somebody who remembers every line of code he has ever done.
Today's post brought to you by the letter: "heck".
 
 
2010 Oct 12 at 07:38 PDT
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
superjer said:
(I actually didn't know any of this until I just now dug around in my $_SESSION. I wrote all this code many years ago.)

Where is this? Rather what's the name of the php?
 
 
2010 Oct 12 at 08:37 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
I'm not sure I understand why only sometimes, if you use the back functionality, the yellow boxen remain.
 
 
2010 Oct 12 at 19:29 PDT
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
Down Rodeo said:
I'm not sure I understand why only sometimes, if you use the back functionality, the yellow boxen remain.

Doesn't that jus' use your cache?
 
 
2010 Oct 12 at 20:24 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
 
 
2010 Oct 13 at 16:13 PDT
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
Down Rodeo said:
Kind of, but sometimes the forums demand a refresh.

Doesn't that answer your question?
 
 
2010 Oct 13 at 18:31 PDT
SuperJer
Websiteman

2005 Mar 20 • 6294
The forums don't care if you refresh the index page. It's probably just your browser.

You have to view a section/area or a truck to get the yellow boxen to change.
 
 
2010 Oct 13 at 18:58 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
Ah, so sometimes the browser says "reload this page when press back" and sometimes it doesn't... I see. I think. Bloody Mozilla! You know, I was trying to view some locally-written MathML the other day, and it turns out Firsfox will only do that if it got the file from the interwebs.
 
 
2010 Oct 14 at 18:11 PDT
Rockbomb
Dog fucker (but in a good way now)

2009 Nov 13 • 2045
This just in: Mellow's "names" truck is stuck yellow-dotted for me
 
 
2010 Nov 9 at 11:08 PST
melloyellow582
The Original Portmanteau

Brisk.
2005 Mar 21 • 12860
666 ₧
Suck it.
 
 
2010 Nov 9 at 11:10 PST
Rockbomb
Dog fucker (but in a good way now)

2009 Nov 13 • 2045
I'd like to point out that this isn't just an issue with SJ's forums, but forum softwares such as vBulletin and PHPBB also do this.
 
 
2010 Nov 23 at 18:22 PST
the_cloud_system
polly pushy pants

2008 Aug 1 • 3074
-6 ₧
i open them in new tabs as i go through the bullitons, and it does it.
I drink to forget but I always remember.
 
 
2010 Nov 23 at 18:51 PST
Page [1]