Wedge

Public area => The Pub => Bug reports => Topic started by: ziycon on June 8th, 2012, 01:11 AM

Title: Reply post showing as 'New'
Post by: ziycon on June 8th, 2012, 01:11 AM
When there are no unread posts and I reply to a topic it, the main page will show no unread posts which is correct but the forum boards show my post a 'New' item, shouldn't this not show up as I just created it!?
Title: Re: Reply post showing as 'New'
Post by: Arantor on June 8th, 2012, 01:15 AM
Yay for SMF bugs.

That's behaviour we've inherited from SMF - since return-to-topic is the default (and is default even in the distribution), you never go to the message index, so it never clears that board as being having unread. SMF is exactly the same in that regard.

In fact the only behaviour we've really changed is that unread doesn't differentiate between 'since last session' and 'forever', meaning that you won't get things appearing and disappearing there.
Title: Re: Reply post showing as 'New'
Post by: nend on June 8th, 2012, 05:43 AM
I noticed that behavior on my SMF installation also. I was wondering about what was the cause. I haven't dug in there yet but any possible solutions?
Title: Re: Reply post showing as 'New'
Post by: Nao on June 8th, 2012, 10:44 AM
It shouldn't be hard to fix. Just an extra query in Post2.php I'd say... :)
Title: Re: Reply post showing as 'New'
Post by: Arantor on June 8th, 2012, 02:46 PM
But marking a board as seen is only really doable if the bulk of the board is read.

The current board-is-read is basically wrong either way.
Title: Re: Reply post showing as 'New'
Post by: Nao on June 8th, 2012, 02:53 PM
Yeah, I think I mentioned a couple of weeks ago another bug with it...
i.e. a sub-board was marked as read in the homepage, and as soon as I read one of the unread topics in it, it lost its 'unread' flag even though there were more unread topics in it.
Title: Re: Reply post showing as 'New'
Post by: Arantor on June 8th, 2012, 03:10 PM
Yup. It's broken however you slice it, really. But none of the systems really has it completely right, because they always have to tread performance vs accuracy.

vBulletin for example considers all posts to be read in a post once they're past a certain age, for example.
Title: Re: Reply post showing as 'New'
Post by: nend on June 8th, 2012, 05:10 PM
Can't you have both, you can do slow queries that return no information via JavaScript after the page has loaded. Would that be a good time to do clean up?
Title: Re: Reply post showing as 'New'
Post by: Dragooon on June 8th, 2012, 05:16 PM
Quote from nend on June 8th, 2012, 05:10 PM
Can't you have both, you can do slow queries that return no information via JavaScript after the page has loaded. Would that be a good time to do clean up?
It's not the extra time it takes to load the page that matters, it wouldn't make a difference to the end user if it takes 0.05s or 0.1s more to load a page, it's the extra load on the servers (which multiplies by a lot in large forums) that actually matters.
Title: Re: Reply post showing as 'New'
Post by: Arantor on June 8th, 2012, 06:20 PM
It might make a difference on nginx/PHP-FPM setups but for folks on Apache/PHP/mod-php, it makes no difference at all, doubly so when mod-gzip is enabled, since Apache will wait until PHP ends execution before returning to the user.

The only way around that is process forking and even I'm not crazy enough to go down that particular rabbit hole with Wedge. I've done it in other cases and it can work, but not for this case.
Title: Re: Reply post showing as 'New'
Post by: nend on June 8th, 2012, 07:51 PM
I was more like saying pass it on to JavaScript for a second request, not run it with the main page load. It should be transparent.
Title: Re: Reply post showing as 'New'
Post by: Dragooon on June 9th, 2012, 01:29 AM
Quote from nend on June 8th, 2012, 07:51 PM
I was more like saying pass it on to JavaScript for a second request, not run it with the main page load. It should be transparent.
Ultimately that'll lead to even more load, as the queries for session authentication will have to be run twice plus the query to get the unread itself along with various other queries that are run.
Title: Re: Reply post showing as 'New'
Post by: nend on June 9th, 2012, 02:12 AM
Quote from Dragooon on June 9th, 2012, 01:29 AM
Quote from nend on June 8th, 2012, 07:51 PM
I was more like saying pass it on to JavaScript for a second request, not run it with the main page load. It should be transparent.
Ultimately that'll lead to even more load, as the queries for session authentication will have to be run twice plus the query to get the unread itself along with various other queries that are run.
I know, but will be transparent, maybe not the best solution thinking of it now.
Title: Re: Reply post showing as 'New'
Post by: Arantor on July 23rd, 2012, 02:55 AM
I'm still not sure how best to deal with this particular little quagmire. I'm sure SMF's solution is not the best, but at the same time I'm not sure how best to fix it, since I'm not sure I'd want it to flag a given board as read if I've only replied to something very new.

Perhaps we should just do that, if your post is the newest in a given board, mark the board as read.
Title: Re: Reply post showing as 'New'
Post by: nend on July 23rd, 2012, 07:07 PM
I am debating on removing the new icon for boards. I can see appeal of leaving them too. :whistle:
Title: Re: Reply post showing as 'New'
Post by: Nao on July 24th, 2012, 06:48 PM
- Calculation: how about we store a 'snapshot' of boards in localStorage, and use that to determine whether there are new boards at runtime? (With JavaScript...) That's in reply to Dragooon's post. I'll go back to sleep now...

- new icon: I'll mention that in the other topic.
Title: Re: Reply post showing as 'New'
Post by: Arantor on July 24th, 2012, 07:06 PM
Which is great until you happen to use another device or computer for checking your forum, e.g. mobile phone vs desktop (and yes it does happen - even you do it ;))
Title: Re: Reply post showing as 'New'
Post by: Nao on July 24th, 2012, 08:31 PM
Then we just don't provide any visual hints for these... Which IMHO is not a huge loss.
Title: Re: Reply post showing as 'New'
Post by: Arantor on July 24th, 2012, 10:44 PM
I suppose if you've got the front page that tells you about new topics, it's probably OK not to display the board index's new boards across platforms...

I think it's worth experimentation.
Title: Re: Reply post showing as 'New'
Post by: markham on July 25th, 2012, 05:55 AM
Quote from Nao on July 24th, 2012, 06:48 PM
- Calculation: how about we store a 'snapshot' of boards in localStorage, and use that to determine whether there are new boards at runtime? (With JavaScript...) That's in reply to Dragooon's post. I'll go back to sleep now...

- new icon: I'll mention that in the other topic.
Just thought I'd mention that that would have privacy implications and is covered by the EU's PECR ....
Title: Re: Reply post showing as 'New'
Post by: Arantor on July 25th, 2012, 11:04 AM
I'm not entirely sure about that.

It's maintaining what amounts to a preference and is not personally identifiable. There are exceptions in the PECR for such things, though it's incredibly vague.