Ask help for strange issue about "new" label/tag

Started by Sebastiii, December 06, 2020, 02:27:22 PM

Previous topic - Next topic

Sebastiii

Hello,

I'm from forum where it's SMF 2.0.15 in use, I didn't know very well PHP/SQL but I run into a strange issue lately and would like to know what can be the culprit :)

In some section of thread (by default not visible when user are not register and logged) when new post are present from subscribe thread:
- Opening a thread from the section (not visible to public), make other "new" to be marked as seen.

I have tested on :
- Different browser
- Different user
- Private navigation
- Delete cookie
- Different computer

It's random but always happen, it's like opening thread1 make as read thread2 but it's not always the first thread, it can be the 4th of the list that make read the first one.
A body of mine, tried to analyze the situation from logs, etc. and find nothing wrong.

When it happens from the same site but on different too, the IP wan stay the same, this is really weird and what can be done to try to nail down this kind of issue ?
Once one user logged and not multiple so what can be wrong lol :)

Thanks for any hint or help on what can be the root cause ;D
Cheers.

EDIT: forgot to add that it happen on normal right user and also with privilege one.

Illori

if you "read" the most recent topic and no one else makes another topic for a while, it is possible for that topic to be left marked as unread. is this what you mean? if so this is completely normal.

Sebastiii

Thanks Illori and sorry for my english, nope, it's not what I meant :)

Trying to explain a bit more :
- There is a section with 10 messages unread (marked with label "new")
- When I click to read the firs one (for ex) but it can be another one with label "new"
- Reading the post go back to the list of topic inside this session and it acts like I have read the 2nd one while it's not true.
- Of course, the real one I have read is marked as read

Doing that with other post make other post as read along with the one I have clicked.

In final for 10 post (unread) reading 4 or 5 post make them all marked as read.

But it's random and sometimes it works like it should : mark only the one I have read and not the other.
I don't know what it happens and from what I suppose and see, it seems to happen to only section where user need to be logged/registered to see that section

The word section is maybe not a correct word, I meant it's a specific part of the forum not visible until we are logged/registered.
Thanks :)

Kindred

That is not normal behavior and I can not reproduce the problem

What is your site url?
Mods installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sebastiii

Hi Kindred,
The site URL is: http://www.attrape-songes.com/forum/index.php :)
Need to look how I can see the list of mod installed but the latest was mention (for tagging).

QuoteInfos sur la version:
Votre version du forum: SMF 2.0.15
Version courante de SMF: SMF 2.0.17
Version de GD: bundled (2.1.0 compatible)
Serveur de base de données: MariaDB
Version MySQL: 10.2.36-MariaDB
PHP: 5.6.40
Version du serveur: Apache

Thanks.

Sebastiii

Finally, I was able to reproduce it here too, let me show you by a video done right now :)
https://youtu.be/Mdqrr-NEe9I

So, I'm using middle button to open in a new tab or right click on link to open in new tab does the same 8)
Like you can see opening a thread, mark as read the one just below the clicked.

This is on EDGE, need to test on other browser from here, but I was able to reproduce it :)

Kindred

this would seem to be an issue with your browser since I have never seen that behavior and can not reproduce it in Edge, FF or Chrome.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sebastiii

I'm using the latest Edge version and tested also on computer at work (latest Win10 version) :)
So yes, it can be Chromium based issue after all, I have redo my test and it doesn't only on my rig but chromium engine, testing along with Brave and it's the same.

So do you know what can be the issue for those engines ? I can try to submit a bug report, I have a register to other forum (Xenforo) didn't run into this issue, but I'm not sure what to tell and supply as good information to try to nail down the bug.

I'm trying to look commit change because it happens around 23 or 24 november and I'm not sure how Edge upgrade their source !

Can you try on Chromium based software ?
Thanks in advance :)

Kindred

Seriously, I just tested 4 sites using Edge and Chrome

I think it's something specific to your installation of Edge....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sebastiii

Ok thanks Kindred
Tested on different rig (clean Win10 for a customer) the latest Edge base on Chromium and it happens, no clue :( but Chrome works so something change recently (I suppose) on Chromium based browser.
Again thank you that you have tested on your side :) will try to debug on my side, not sure if I will be able to :)

Hoping that in between a fix will be made on Chromium (if it's the origin of the issue ofc :) )
But fresh Win10 along with tested on other computer not the same Wan IP (different place using remote connection (Anydesk) ), it's a really crazy weird issue :)

Will keep you in touch if I find something :D

shawnb61

Mods installed?  Theme used?  Does it do this on the default theme?

I seem to recall while back we found a mod that did this...  It was querying the next message in a way that caused it to be flagged as read... 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Kindred

Shawn -- if you want the video he linked, he actually made it happen here on the SimpleMachines.org site....

I definitely can not recreate it in Edge, Chrome or Firefox on this site or on any other,  but since he can do it here, it pretty much has to be something in the browser -- I just can't imagine what.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

I was just able to reproduce it...  It's a thing...

For me, it *always* flags the next post as read.  No exceptions.  For me, it's not visible, though, until I hit the browser refresh button.   That's when the flags disappear.   (2.0 only, not 2.1)

This is sounding very familiar, but I haven't found the old thread. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Kindred

strange....  I literally can not reproduce it on any browser.

Wonder what the differences in our setting are?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

I get this on the new Edge browser (Blue swirl, not e - 87.0.664.55 (Official build) (64-bit)) and on Chrome (Version 87.0.4280.88 (Official Build) (64-bit)).

I have not seen it on FF (83.0 (64-bit)) or on Pale Moon (v28.16.0 (2020-11-24)).

Exact same user ID (& thus settings) & forum. 

I do see some variation on the web vs localhost (much more consistently on localhost).  I also see some variation on whether I sit on a page longer or not (if I go back & forth very quickly, it may not happen). 

Possibly a Chromium thing???  I do know they've been experimenting with speeding up forward/back in the latest versions, & this might be related. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sebastiii

Quote from: shawnb61 on December 07, 2020, 07:58:04 PM
I get this on the new Edge browser (Blue swirl, not e - 87.0.664.55 (Official build) (64-bit)) and on Chrome (Version 87.0.4280.88 (Official Build) (64-bit)).
Thanks for confirming too :) I was started to be crazy lol :)

QuoteI have not seen it on FF (83.0 (64-bit)) or on Pale Moon (v28.16.0 (2020-11-24))
Possibly a Chromium thing???  I do know they've been experimenting with speeding up forward/back in the latest versions, & this might be related.
That's the idea that comes in my mind too, this is weird but happy that you was able to reproduce on your side :)
if we can confirm it's a Chromium issue, how we can report them ?
I know that some this on code can trigger hidden one on other code so maybe it trigger an old bug on forum code ? Is this possible too ?

Sorry @Kindred, I forgot to mention to do F5 (refresh) and without this priority information, for sure you can't reproduce it, good @shawnb61 mention it  :)

Kindred

yeah... It's very strange...    I did all the same steps, including the f5 reload. Still can't reproduce it. (and yes, I have the blue swirl edge (Version 87.0.664.55 (Official build) (64-bit))

edit...
just updated to  Version 87.0.664.57 (Official build) (64-bit) and I was able to reproduce ONCE out of 20 tries....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

It's not browser flakiness, as I initially thought.  There are actually 2 DB updates to log_topics vs 1 as well, logging what has been "read".  Interesting.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sebastiii

Quote from: shawnb61 on December 08, 2020, 01:01:36 PM
It's not browser flakiness, as I initially thought.
Strange then, it should be happening always right ?

QuoteThere are actually 2 DB updates to log_topics vs 1 as well, logging what has been "read".  Interesting.
This is interesting and thanks to try to find where can be the cause ;)

Quote from: Kindred on December 08, 2020, 12:18:50 PM
just updated to  Version 87.0.664.57 (Official build) (64-bit) and I was able to reproduce ONCE out of 20 tries....

Thanks for confirming too even if it happens not like quite always like on my side.
I did have an SSD so maybe files access is faster locally at least, but no real clue :-[

Sebastiii

A great member from our forum seems to maybe found the cause of this issue, need to give him more test to do but when he added line from 2.0 template to 2.1, this issue appear too on 2.1 local version forum :).

So when he confirms me that it close to 99% related, will report back :)
Thanks to him :D


prefertolurk

 I have been experiencing this bug on the hxxp:nasaspaceflight.com [nonactive] forum (2.0.15) for a few weeks now.  I have done a decent amount of testing, and I am able to replicate it at home and at work -- both Chrome and windows 10 setups.  There are a few others on that forum that are also reporting the bug in our local bug report forum.  This is what I have found through my testing:

If there is a forum thread that has 20 pages and my last unread post was on page 19, and then I click the "new" tag, It will take me directly to the oldest unread post on page 19. (as expected) If I go back to the listing of threads, the new tag will still be on that thread, but if I click it, it will take me to the top of page 20. If I go back one more time, the new tag is gone.  (this behavior is all as expected)

The bug, is that this exact same behavior is happening to the thread below the one I am reading as well.  So if I have only one unread page in the thread beneath the one I am reading, clicking the new tag will immediately clear the new tag from the thread below. If I have two pages of unread posts in that thread, clicking the new tag will only clear that first page of posts as unread and the new tag on the other thread will still be there, but now it wont take me to the correct page. 

It is literally behaving as if I am clicking the new tag on both threads at the same time.

I am a C# programmer by trade, but I know enough about javascript to give myself headaches trying to read it.  If I had to guess though, there is a bug in one of the places that iCurMessageId is being set.

That's about all the digging I can do before my overwhelming sense of pity for javascript developers overwhelms my ability to debug any farther. :-) I salute you, javascript devs. 

Good hunting.

Sebastiii

Thanks @prefertolurk, this is the issue (started on 23/11 for me lol)

So this is the answer from a modo that found a fix but maybe you can confirm or adapt it in more elegant way or not :)

The issue is related to this part (not in 2.1 forum)  <link rel="next" href=... />
That part of code can be found at the line 150 of the script "index.template.php" for the default theme :

Quote// If we're viewing a topic, these should be the previous and next topics, respectively.
   if (!empty($context['current_topic']))
      echo '
   <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

So he thinks this can be removed for good but has interrogation, maybe this can be kept for only not logged user, like this bot indexation can do their job (search engine) ? :)

What do you think and maybe you can confirm that removed or let only for no logged user will not create regression ?
For sure, when he added those 2 lines on 2.1 forum version, this issue start to appear.

Thanks ;P

shawnb61

Yes, the above works.  I have been testing that myself.

I believe this is a bug in Chrome.  In the past, the links above helped search engines deal properly with pagination, but they haven't been used for a while, so they are unnecessary.  They are not used in 2.1, which doesn't have this issue.

And their presence definitely causes issues with the latest Chromium-based browsers.  The browser generates a "silent" next page request, that is not displayed.  But SMF sees the next page request & delivers it & thus marks the page as read.

The browser is generating two GET requests, as if you hit the next > subject link.  This is from my apache access log:
127.0.0.1 - - [11/Dec/2020:13:50:26 -0800] "GET /yadayada/index.php?topic=2.0 HTTP/1.1" 200 5650
...
127.0.0.1 - - [11/Dec/2020:13:50:29 -0800] "GET /yadayada/index.php?topic=2.0;prev_next=next HTTP/1.1" 200 5442
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

vbgamer45

Very interesting thanks for looking into it! Should help with sever load but generally i don't think many people use those links in topics.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

shawnb61

Quote from: vbgamer45 on December 11, 2020, 06:35:43 PM
Very interesting thanks for looking into it! Should help with sever load but generally i don't think many people use those links in topics.

To be clear, the next/prev links remain.

These link rel attributes are at the top of the page source, and are meant to be metadata showing the relationships between pages.   Helpful to search engines, not nav buttons.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sebastiii

Quote from: shawnb61 on December 11, 2020, 06:20:37 PM
Yes, the above works.  I have been testing that myself.
Great, thanks for confirming :)

QuoteI believe this is a bug in Chrome.  In the past, the links above helped search engines deal properly with pagination, but they haven't been used for a while, so they are unnecessary.  They are not used in 2.1, which doesn't have this issue.
So this can be removed in current 2.0 code ;D

QuoteAnd their presence definitely causes issues with the latest Chromium-based browsers.  The browser generates a "silent" next page request, that is not displayed.  But SMF sees the next page request & delivers it & thus marks the page as read.
Ok, that's good again for your explanation and confirmation, we will go this way to fix it for now :)

shawnb61

I am fairly sure this is a bug with Chromium itself, that exhibits in both Edge & Chrome.

We'll see what comes back from the Chromium team.  (They have created accounts on this site & are attempting to recreate on their end...  You can see the back & forth here: https://bugs.chromium.org/p/chromium/issues/detail?id=1158209)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sebastiii

Quote from: shawnb61 on December 14, 2020, 09:13:01 PM
I am fairly sure this is a bug with Chromium itself, that exhibits in both Edge & Chrome.
Yes it seems so :)

QuoteWe'll see what comes back from the Chromium team.  (They have created accounts on this site & are attempting to recreate on their end...  You can see the back & forth here: https://bugs.chromium.org/p/chromium/issues/detail?id=1158209)
Big thanks for opening a bug report there, hoping for a fix :)

crash56

FWIW, I ran into this exact same issue at our forum.  I applied the fix described in Reply #21, and it did the trick.  The unread posts are behaving properly now.  Thank you, all you genius SMF gurus.  :D

prefertolurk

Just a follow up, I posted a link to this thread and the recommended fix in our bug report forum over at hxxp:nasaspaceflight.com [nonactive] and after they disabled the prefetch prev/next links everything is working as intended again! 

Thanks for your help.

Sebastiii

@prefertolurk and @crash56
For now, it's the way to go  :)

drewactual

i've seen this too.... a member brought it to my attention and it happens every time.  i haven't had any time to look into it, though.   i'm still running 2.0.15 on that forum, as i'm waiting for full release of 2.1 before i do anything else with it. 

Kindred

You do need to update to 2.0.17 if you plan to stay on 2.0.x until 2.1 is ready
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sebastiii

Good there an update with a commit to master on Chromium bug report :)
I can't test right now but looking at it, it's related prefetch for the next tag :) So looks nice :)

shawnb61

The fix to the Chromium engine has been moved to production & is in the just-released version of Chrome.  I have tested it, & it looks good!

Tested on Chrome Version 87.0.4280.141 (Official Build) (64-bit).
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sebastiii

Thank you, @shawnb61
This is really great that you have looked into this and reported the bug on chromium bug report :)
Time to test :)

Turrican3

I am not 100% sure we're talking about the very same issue but I believe I'm seeing it with Firefox 64-bit 84.0.2 as well (Windows 10)

So I'm going to try to apply the fix suggested and see if this works.

Sebastiii

For now on Chrome build:
Version 87.0.4280.141 (Official Build) (64-bit)

And Brave build:
Version 1.18.78 Chromium: 87.0.4280.141 (Official Build) (64-bit)

It doesn't work, on https://www.simplemachines.org/
This is weird !

Sebastiii

Good news :)
On version :
Brave : Version 88.0.4324.96 (Official Build) (64-bit)
Chrome : Version 88.0.4324.104 (Official Build) (64-bit)
Edge : Version 88.0.705.50 (Official Build) (64 bits)
it's fixed on my side :)

Advertisement: