News:

Wondering if this will always be free?  See why free is better.

Main Menu

Orange New message link not sending to new message

Started by chadon, February 22, 2019, 07:37:11 PM

Previous topic - Next topic

chadon

When on SMF 2.0 an user was on a list of topics and clicked on the "new" link before the title of a topic, he was sent to the first unread post but I noticed on my new 2.1 upgraded forum that users are sent instead to the first post of the page.

Here is a link I just copied from my forum:
index.php?topic=51071.msg1200263;topicseen#new

To send the user to the right message, the "msg1200263" in the URL should be the ID of the 1st unread post in this page, but in this page, none has this ID.
The 1st message that I didn't read had in fact the  "msg1200272" ID and when I place that ID in the URL I posted above, the user is sent directly to the right message.
index.php?topic=51071.msg1200272;topicseen#new

I tried to repair the forum from the maintenance panel but it had no effect and the unread link never sends to the 1st unread message.

Bigguy

It's the same on my board. As well as clicking on a link in the alerts does not take you to the last unread post in a thread.

landyvlad

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

woolly bugger

not only that but there is no way to go to last post...

Illori

there was a bug reported on GitHub related to this, but I cant find it to see if it was resolved or not.

Arantor


woolly bugger

only see time/date on the computer not on the phone....

chadon

Quote from: Arantor on February 28, 2019, 10:41:48 AM
Quote from: woolly bugger on February 28, 2019, 08:26:29 AM
not only that but there is no way to go to last post...

Click on the time/date?
The link on the time and date has a matching message ID as the last message of the topic but it also sends the visitors to the first message of the last page, not the actual last message.
Here is an exemple of a time/date link: index.php?topic=34470.msg1201740;topicseen#msg1201740

There is also something that doesn't make any sense to me.

The link on the title and the time and date of the last message looks like this:
index.php?msg=1201740
and this link does send the user straight to the right message. If the first link did send to the right message, wouldn't this make duplicate content for search engines?

Kindred

Сл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."

Arantor

And the msg= short form uses a redirect anyway.

live627

Does the page jump to the unread post if you hit refresh?

chadon


live627

I have some code for you to replace. In ./Sources/Display.php, find at or around line 993

$firstIndex = $limit - 1;

Replace with

$firstIndex = empty($options['view_newest_first']) ? $start - 1 : $limit - 1;

I really hope that solves the issue. Debugging this ate up way too much time.

chadon

Quote from: live627 on March 01, 2019, 10:39:05 PM
I have some code for you to replace. In ./Sources/Display.php, find at or around line 993

$firstIndex = $limit - 1;

Replace with

$firstIndex = empty($options['view_newest_first']) ? $start - 1 : $limit - 1;

I really hope that solves the issue. Debugging this ate up way too much time.
Yes! It did fix the new message link and the last message link so I would say it is a complete success.  :) Thank you very much for your time live627. 


Advertisement: