ziycon

  • Posts: 126
Reply post showing as 'New'
« on June 8th, 2012, 01:11 AM »Last edited on June 8th, 2012, 01:27 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!?
APRAI - Custom Theme - SMF 2.0.5


Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Reply post showing as 'New'
« Reply #1, 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.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

nend

  • When is a theme, no longer what it was when installed?
  • Posts: 165
Re: Reply post showing as 'New'
« Reply #2, 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?

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Reply post showing as 'New'
« Reply #3, on June 8th, 2012, 10:44 AM »
It shouldn't be hard to fix. Just an extra query in Post2.php I'd say... :)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Reply post showing as 'New'
« Reply #4, 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.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Reply post showing as 'New'
« Reply #5, 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.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Reply post showing as 'New'
« Reply #6, 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.

nend

  • When is a theme, no longer what it was when installed?
  • Posts: 165
Re: Reply post showing as 'New'
« Reply #7, 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?

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: Reply post showing as 'New'
« Reply #8, 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.
The way it's meant to be

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Reply post showing as 'New'
« Reply #9, 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.

nend

  • When is a theme, no longer what it was when installed?
  • Posts: 165
Re: Reply post showing as 'New'
« Reply #10, 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.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: Reply post showing as 'New'
« Reply #11, 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.

nend

  • When is a theme, no longer what it was when installed?
  • Posts: 165
Re: Reply post showing as 'New'
« Reply #12, 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.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Reply post showing as 'New'
« Reply #13, 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.

nend

  • When is a theme, no longer what it was when installed?
  • Posts: 165
Re: Reply post showing as 'New'
« Reply #14, 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: