Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to johnstevens77,Bhoddhisatva,scotia,Anonymous,Cornytiv34, for Donating to support the site

First unread post - not!

Formerly "Lemon Fool - Improve the Recipe" repurposed as Room 102 (see above).
Slarti
Lemon Quarter
Posts: 2941
Joined: November 4th, 2016, 3:46 pm
Has thanked: 640 times
Been thanked: 496 times

First unread post - not!

#144740

Postby Slarti » June 9th, 2018, 5:00 pm

I've just confirmed to myself that if your first unread post is the last one on a page and there are others on the next page, you miss the one at the bottom of the previous page.

I thought that I'd noticed this before, but wasn't sure.

If you look at the Plusnet thread - viewtopic.php?f=39&t=11362 - you'll see that the bottom post on page 1 was at 09 Jun 2018 00:10 but when I clicked First unread post, a few minutes ago, I was taken to the first post on page 2.

A bug to be reported to the software supplier?

Slarti

PinkDalek
Lemon Half
Posts: 6139
Joined: November 4th, 2016, 1:12 pm
Has thanked: 1589 times
Been thanked: 1801 times

Re: First unread post - not!

#144804

Postby PinkDalek » June 10th, 2018, 12:12 pm

Slarti wrote:I've just confirmed to myself that if your first unread post is the last one on a page and there are others on the next page, you miss the one at the bottom of the previous page. ...


How are you accessing the unread posts?

If via the Quick Links above left, it may be that you've clicked on the most recent for page 2, whereas the one for page 1 is lower down. Similarly, if using Notifications above right, the same might happen.

I can't replicate just now but have a feeling Notifications will alert you to recent posts on separate pages, separately. In other words, I might well go to the most recent on a page 1 and then find I have a further Notification relating to posts on page 2, if that makes sense.

Slarti
Lemon Quarter
Posts: 2941
Joined: November 4th, 2016, 3:46 pm
Has thanked: 640 times
Been thanked: 496 times

Re: First unread post - not!

#144808

Postby Slarti » June 10th, 2018, 12:48 pm

PinkDalek wrote:
Slarti wrote:I've just confirmed to myself that if your first unread post is the last one on a page and there are others on the next page, you miss the one at the bottom of the previous page. ...


How are you accessing the unread posts?

If via the Quick Links above left, it may be that you've clicked on the most recent for page 2, whereas the one for page 1 is lower down. Similarly, if using Notifications above right, the same might happen.

I can't replicate just now but have a feeling Notifications will alert you to recent posts on separate pages, separately. In other words, I might well go to the most recent on a page 1 and then find I have a further Notification relating to posts on page 2, if that makes sense.


I go into a board that is of interest to me, click on the post, or go next from the first one I looked at and then select first unread post near the top right.

Slarti

tjh290633
Lemon Half
Posts: 8209
Joined: November 4th, 2016, 11:20 am
Has thanked: 913 times
Been thanked: 4097 times

Re: First unread post - not!

#144831

Postby tjh290633 » June 10th, 2018, 5:05 pm

If you are on a page with unread post on it, that unread post will be counted as read, perhaps, so clicking on first unread post will take you to the next page.

Not easy to prove, but I've found that sometimes the unread post has lost its red marker if I have clicked twice on the page link.

TJH

PinkDalek
Lemon Half
Posts: 6139
Joined: November 4th, 2016, 1:12 pm
Has thanked: 1589 times
Been thanked: 1801 times

Re: First unread post - not!

#144858

Postby PinkDalek » June 10th, 2018, 7:24 pm

Slarti wrote:
PinkDalek wrote:

I can't replicate just now but have a feeling Notifications will alert you to recent posts on separate pages, separately. In other words, I might well go to the most recent on a page 1 and then find I have a further Notification relating to posts on page 2, if that makes sense.


I go into a board that is of interest to me, click on the post, or go next from the first one I looked at and then select first unread post near the top right.

Slarti



As TJH also seems to be saying, you are getting to a page with an unread post on it. When you get there, you might be deemed to have read all the posts on that page. Clicking First Unread Post will then throw you forward to the next page, possibly.

I'll try and check this out when there are sufficient posts on a Topic during the week, unless someone else confirms in the meantime.

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: First unread post - not!

#144918

Postby Gengulphus » June 11th, 2018, 9:52 am

PinkDalek wrote:As TJH also seems to be saying, you are getting to a page with an unread post on it. When you get there, you might be deemed to have read all the posts on that page. Clicking First Unread Post will then throw you forward to the next page, possibly.

It's not that, at least not exactly, because when I tried the "First unread post" link on this page just now, it went to your post, and viewing the page's source showed that the link was specified by:

<a href="#unread" class="mark">First unread post</a>

The 'href' part specifies where the link is to go, and the "#unread" part of it basically says to go to the place marked "unread" on the same page. So what happens is that when you first load the page, the software notices that your first unread post in the thread is in the same page, so inserts that simple "First unread post" link and marks where it is to go with "unread". Very shortly later, as a later stage in the same page download, it will mark all the posts in the page as read, but by then it has finished constructing the stuff to send to your browser, so what the link is and where the "unread" mark is won't be affected by that - unless you reload the page, that is!

Something similar will apply to the colours of the tiny 'page' icons at the start of each post, by the way: loading the page will send HTML source to your browser that says they're red if they're unread, white if read, then mark all the posts on the page as read.

I also tried loading the first page of a multi-page thread that I have unread posts on, but after the first page, then viewing the source of that. Its equivalent link is:

<a href="./viewtopic.php?f=59&amp;t=12051&amp;view=unread#unread" class="mark">First unread post</a>

That more complicated link basically says to load a later page of the thread and go to the place marked "unread" on it. So, not very surprisingly, the software has to construct the "First unread post" link differently depending on whether the first unread post is in the page being loaded or a different page. The bug, if genuine and not for instance being caused by somehow doubly loading the page, is probably an "out by one" mistake in the condition that chooses whether to generate the simple link or the more complicated one.

Gengulphus

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: First unread post - not!

#145215

Postby Gengulphus » June 12th, 2018, 3:06 pm

I've just managed to test this particular report. I noticed this morning that a post of mine had left the "WPP" thread viewtopic.php?f=15&t=12140 on 19 posts. So I took care not to read it again until I saw not just that it had unread posts on it, but also that it had gone on to a second page, which it has now done. Looking at it as I normally do by clicking on the red circle at the left of the thread subject in my list of threads to read went to the first page of the thread, positioned at the first new post and with that post having a red 'page' icon, which is all as it should be. But on viewing the loaded page's source, the "First unread post" link was specified by:

<a href="./viewtopic.php?f=15&amp;t=12140&amp;view=unread&amp;sid=2d10cef4789a3ad1b1e79ae877795423#unread" class="mark">First unread post</a>

which is actually more complex still than the second one in my last post (but I'm not certain what the extra "&amp;sid=2d10cef4789a3ad1b1e79ae877795423" actually does!). Clicking on it goes to the second page of the thread, positioned at its first post, which was of course its first unread post (*).

So basically, the software is correctly keeping track of which posts have been read, but is failing to construct the "First unread post" link correctly in the case in question. I would in fact never normally encounter the problem due to my habit of clicking on the red circle at the left of the thread subject, but someone who is instead in the habit of clicking the thread subject itself (which goes to the start of its first page) and then clicking the "First unread post" link would skip reading the unread message on the first page.

(*) That "of course" is based on the fact that I read threads in a straightforward fashion. It would have been possible for me to contrive a situation in which I had already read that second page, by clicking on the 'page 2' icon in its entry in a list of threads - but the word "contrive" is definitely the correct one to use to describe that!

Gengulphus

Slarti
Lemon Quarter
Posts: 2941
Joined: November 4th, 2016, 3:46 pm
Has thanked: 640 times
Been thanked: 496 times

Re: First unread post - not!

#145250

Postby Slarti » June 12th, 2018, 5:08 pm

Gengulphus wrote:but someone who is instead in the habit of clicking the thread subject itself (which goes to the start of its first page) and then clicking the "First unread post" link would skip reading the unread message on the first page.


I'm glad I wasn't imagining it.

And I've learned about clicking on the red circle, which I must have missed when first reading the instructions.

Also, as I am often missing for much of a day, or longer, I will often go to, say, "Does anyone know?" go into the oldest new message and when finished there, click Next topic, which always takes you to the first message in that topic, even if there are multiple pages. I think it was when I was doing that that I noticed the odd behaviour.

Slarti

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: First unread post - not!

#145289

Postby Gengulphus » June 12th, 2018, 7:06 pm

I've had some further thoughts about things to investigate, starting with the question "Does it actually matter whether there is just one unread post on the first page involved?", and about ways to investigate them. The investigation methods involved using the Polite Discussions board, which was very useful because I only occasionally end up reading posts there and its threads tend to go on for multiple pages, so it was a rich source of multi-page threads with lots of unread posts in them. And that plus happening to notice what was occurring on my browser's URL bar during the page-loading process have led me to what I believe is a full understanding of what is going on - and it turns out that the answer to the question is that no, it doesn't matter - it happens whenever there are unread posts on the current page and there are further pages in the thread (*).

The key point was to notice that when I loaded (for instance) my totally unread multi-page thread:

https://www.lemonfool.co.uk/viewtopic.php?f=63&t=11768&view=unread#unread

the URL bar on my browser first showed that but then quickly changed to:

https://www.lemonfool.co.uk/viewtopic.php?p=139919#p139919

I.e. the page loading process had taken a link that said that I wanted to look at the first unread post of forum 63, topic 11768 and redirected it to a link saying that I want to look at the page containing post 139919. The "First unread post" link of that thread is:

https://www.lemonfool.co.uk/viewtopic.php?f=63&t=11768&view=unread#unread

and because that's a marked position in a different URL to the one that the browser is currently in (even if that page's URL was generated as a redirection from the same URL), the browser reckons it has to load that URL and go to that mark in it. But by now the 20 posts on the first page of the thread have been marked as 'read', and so this time the page loading process redirects it to the page containing post 140278, which is the 21st post in the thread:

https://www.lemonfool.co.uk/viewtopic.php?p=140278&sid=b32e3f1baf88babc325e2198d16e1229#p140278

That page's "First unread post" link is:

https://www.lemonfool.co.uk/viewtopic.php?p=140278&sid=b32e3f1baf88babc325e2198d16e1229#unread

i.e. its own URL with just a conversion of the "p140278" mark into an "unread" mark, and that means that when it is clicked, the browser recognises that it's simply a different marked position in the URL that it's currently got loaded, and so just goes to that position without doing a page load.

So basically, it's all a consequence of forum/topic (= board/thread) style links being redirected to post style links, plus the posting software creating the "First unread post" link from the post's current URL by simply changing the marked position to "unread" (i.e. what the simple piece of HTML code does) if it's the last page of the thread (presumably on the basis that the first unread post must be in the current page if that's the case, but by converting the URL proper to forum/topic style and asking for the position marked "unread" in that if it's in an earlier page than the last one (what the more complicated bits of HTML code do).

(*) Those further pages will contain only 'unread' posts, by the way - in the course of my investigations, I discovered that reading a page of a thread marks not only all posts currently on that page as 'read', but also all posts on previous pages. This will simplify the software implementation and reduce the storage requirements significantly, as it means that what has been 'read' on a thread can be tracked with a single post number, namely the number of the most recent post that has been loaded. Updating that can be done by getting the number of the highest post on the loaded page each time a page is loaded, and changing the thread's "most recent 'read' post" number to it if either the thread doesn't currently have such a number (i.e. first time the user has read the thread) or it is larger than the thread's current such number.

Gengulphus

csearle
Lemon Quarter
Posts: 4764
Joined: November 4th, 2016, 2:24 pm
Has thanked: 4814 times
Been thanked: 2083 times

Re: First unread post - not!

#145365

Postby csearle » June 13th, 2018, 7:33 am

Gengulphus wrote:The investigation methods involved using the Polite Discussions board...
I sincerely hope you managed to conduct your experiments without actually reading the content. ;) Chris


Return to “Room 102 - Site Issues, Complaints & General Chat”

Who is online

Users browsing this forum: No registered users and 12 guests