FORUMS

Issue with "Jump to first unread" on the subscribed threads

1,824 posts
Thanks Meter: 4,477
 
By Tungstwenty, Recognized Contributor on 10th September 2012, 05:13 PM
Post Reply Subscribe to Thread Email Thread
Hi,

I use a lot the small arrow to the left of each subscribed thread to jump to the 1st unread post.
Most of the time it works correctly, but from time to time it will show me the start of the previous page and be left at the top, since the URL anchor is not present on that page.

The original link will be something like ".../showthread.php?goto=newpost&t=nnnnnn", which later resolves to ".../showthread.php?p=mmmmmm#postmmmmmm".
The problem is that "showthread.php", when processing with the "p=..." argument, sometimes fails and presents the previous page than it should. If I were to replace "p=mmmm" by "t=nnnn&page=yyy", leaving the anchor, it will work.

Based on some experiments, my guess is that that php, when processing in the p= mode, fails to handle the edge case where post_count mod page_length is 0. I tried it with multiple page sizes, and for the case I was trying it (before I read the post and now need to wait for another case like this), the post was a multiple of 10, 20, 30 and 40 but not 50. So, only after changing the page length to all values to confirm it was failing, and finally to 50, did it work properly.
I normally use 20 posts per page so the chances of the last unread being a multiple of that are pretty slim, but those using 10/page are likely to experience this more often.


FIX: The formula for the page count "page_number=((post_count - 1) DIV page_length) + 1" or equivalent. Currently there's an offset of 1 that probably nobody ever complained about (at least I didn't find any post mentioning this).

This occurs regardless of the selected theme, and also on the XDA app (the server side is probably the same, or shares that part of the code).


EDIT: It appears that the conditions are not that simple. Sometimes, *after* the situation has been triggered (or so it seems), refresh of the subscribed threads view won't solve it immediately. Even if my next unread post is, say, the 3rd on the next page, I'll still be taken to the top of the previous page and therefore not land on the right post (correct anchor, but wrong page). Something to do with caching, perhaps?
Last edited by Tungstwenty; 10th September 2012 at 05:21 PM.
 
 
10th September 2012, 06:11 PM |#2  
It_ler's Avatar
XDA: ASSIST
Recognized Contributor
Thanks Meter: 16,178
 
More
Quote:
Originally Posted by Tungstwenty

Hi,

I use a lot the small arrow to the left of each subscribed thread to jump to the 1st unread post.
Most of the time it works correctly, but from time to time it will show me the start of the previous page and be left at the top, since the URL anchor is not present on that page.

The original link will be something like ".../showthread.php?goto=newpost&t=nnnnnn", which later resolves to ".../showthread.php?p=mmmmmm#postmmmmmm".
The problem is that "showthread.php", when processing with the "p=..." argument, sometimes fails and presents the previous page than it should. If I were to replace "p=mmmm" by "t=nnnn&page=yyy", leaving the anchor, it will work.

Based on some experiments, my guess is that that php, when processing in the p= mode, fails to handle the edge case where post_count mod page_length is 0. I tried it with multiple page sizes, and for the case I was trying it (before I read the post and now need to wait for another case like this), the post was a multiple of 10, 20, 30 and 40 but not 50. So, only after changing the page length to all values to confirm it was failing, and finally to 50, did it work properly.
I normally use 20 posts per page so the chances of the last unread being a multiple of that are pretty slim, but those using 10/page are likely to experience this more often.


FIX: The formula for the page count "page_number=((post_count - 1) DIV page_length) + 1" or equivalent. Currently there's an offset of 1 that probably nobody ever complained about (at least I didn't find any post mentioning this).

This occurs regardless of the selected theme, and also on the XDA app (the server side is probably the same, or shares that part of the code).


EDIT: It appears that the conditions are not that simple. Sometimes, *after* the situation has been triggered (or so it seems), refresh of the subscribed threads view won't solve it immediately. Even if my next unread post is, say, the 3rd on the next page, I'll still be taken to the top of the previous page and therefore not land on the right post (correct anchor, but wrong page). Something to do with caching, perhaps?

+1
I have recognized this radom issue from time to time in xda app and on my PC.
The last few times when the jump to first unread post failed (jumped to the wrong post), there was a new page in the thread.
And instead of jumping to the first post on the last page of the thread, this action jumped to the first post on the second-last page of the thread (which was the last page before the new post was added).

But I also recognized the issue, that the jump to first unread post lead me to the last post of the thread, even if I have not read one or two posts before this last post.

The strange thing is that this function works correct most of the time ... only sometimes it misbehaves.
14th October 2012, 03:14 AM |#3  
Senior Member
Thanks Meter: 28
 
More
Same problem here! Will anyone fix this?
24th November 2012, 11:47 AM |#4  
Senior Member
Thanks Meter: 28
 
More
BUMP! When will this be fixed?
20th March 2014, 12:24 AM |#5  
Senior Member
Flag Phoenix
Thanks Meter: 255
 
Donate to Me
More
Quote:
Originally Posted by kevindd992002

BUMP! When will this be fixed?

Bump again, still not fixed and very annoying.
21st March 2014, 07:44 PM |#6  
bitpushr's Avatar
XDA:Administrator
Thanks Meter: 1,578
 
More
I'm having issues recreating this problem. We have a query that is similar to the one you said but a little bit different, also there are also factors that may be playing into consideration such as if a post was deleted and I'm wondering if that might be returning the incorrect offset. Can you give me steps to reproduce this again? Is it only threads where you have an unread post count = the number of posts per page?
21st March 2014, 08:16 PM |#7  
Senior Member
Flag Phoenix
Thanks Meter: 255
 
Donate to Me
More
Quote:
Originally Posted by bitpushr

Can you give me steps to reproduce this again? Is it only threads where you have an unread post count = the number of posts per page?

For me, using the 2010 interface, anytime on any thread, when I use the shortcut sent to me via an email sent by the XDA website, or use the jump to first unread button it will normally go to the top of the page of the last page I read. Then the next several times I use a shortcut to the thread it goes to that place even when more pages are used and I've read through them all. Then after several visits it will reset and go to the top of the last page I visited again.

I use 50 posts per page. And using the 2010 interface, it NEVER goes to the first unread post whether I use a shortcut from an email sent by XDA or using the button on the top of the page.

Thanks for the help.
22nd March 2014, 11:20 AM |#8  
Tungstwenty's Avatar
OP Recognized Contributor
Thanks Meter: 4,477
 
Donate to Me
More
Lately I haven't come across this issue, or at least I haven't noticed. I'm not sure if it's because the frequency I check the forum is quite lower, if something was fixed / updated on the server, if it's because I'm now using the 2013 Beta theme instead of the 2013 Beta - 1024 I used before, or something else.
I'll keep an eye out, though, and post here if I do come across this problem again with as much info I can infer from the situation.
22nd March 2014, 03:11 PM |#9  
arief03's Avatar
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Tungstwenty

Hi,

I use a lot the small arrow to the left of each subscribed thread to jump to the 1st unread post.
Most of the time it works correctly, but from time to time it will show me the start of the previous page and be left at the top, since the URL anchor is not present on that page.

The original link will be something like ".../showthread.php?goto=newpost&t=nnnnnn", which later resolves to ".../showthread.php?p=mmmmmm#postmmmmmm".
The problem is that "showthread.php", when processing with the "p=..." argument, sometimes fails and presents the previous page than it should. If I were to replace "p=mmmm" by "t=nnnn&page=yyy", leaving the anchor, it will work.

Based on some experiments, my guess is that that php, when processing in the p= mode, fails to handle the edge case where post_count mod page_length is 0. I tried it with multiple page sizes, and for the case I was trying it (before I read the post and now need to wait for another case like this), the post was a multiple of 10, 20, 30 and 40 but not 50. So, only after changing the page length to all values to confirm it was failing, and finally to 50, did it work properly.
I normally use 20 posts per page so the chances of the last unread being a multiple of that are pretty slim, but those using 10/page are likely to experience this more often.


FIX: The formula for the page count "page_number=((post_count - 1) DIV page_length) + 1" or equivalent. Currently there's an offset of 1 that probably nobody ever complained about (at least I didn't find any post mentioning this).

This occurs regardless of the selected theme, and also on the XDA app (the server side is probably the same, or shares that part of the code).


EDIT: It appears that the conditions are not that simple. Sometimes, *after* the situation has been triggered (or so it seems), refresh of the subscribed threads view won't solve it immediately. Even if my next unread post is, say, the 3rd on the next page, I'll still be taken to the top of the previous page and therefore not land on the right post (correct anchor, but wrong page). Something to do with caching, perhaps?

BUMP! When will this be fixed?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes