Advertisement:

Author Topic: Not a bug, but wrong behavior  (Read 350 times)

Offline digger

  • Full Member
  • ***
  • Posts: 690
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
Not a bug, but wrong behavior
« on: December 27, 2017, 01:52:36 AM »
We have a forum links to the messages like this
index.php?topic=1.msg123
If we move this message to another topic, the current link for the message will be
index.php?topic=2.msg123
But if we click on the old link index.php?topic=1.msg123 we'll get into the wrong location in the first topic, and not where the message 123 is now.


Online Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,859
  • Gender: Male
  • The Artist Formerly Known as LexArma
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Not a bug, but wrong behavior
« Reply #1 on: December 27, 2017, 07:52:31 AM »
I believe this is intended behavior. The message ID is unique, and allows for links like this
https://www.simplemachines.org/community/index.php?msg=3954194
so you can directly point to a message anywhere in the forum, without knowing the board or topic it is in.

Finnish Native Language Support Specialist & Former (Lead) Support Specialist

Offline digger

  • Full Member
  • ***
  • Posts: 690
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
Re: Not a bug, but wrong behavior
« Reply #2 on: December 27, 2017, 08:00:46 AM »
I believe this is intended behavior. The message ID is unique, and allows for links like this
https://www.simplemachines.org/community/index.php?msg=3954194
so you can directly point to a message anywhere in the forum, without knowing the board or topic it is in.
Such links are not displayed anywhere in the forum and they can only be created manually.
Usually all users copy a message link from the title of the message and this link is https://www.simplemachines.org/community/index.php?topic=557937.msg3954194#msg3954194

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,326
    • Arantor on GitHub
Re: Not a bug, but wrong behavior
« Reply #3 on: December 27, 2017, 08:01:49 AM »
It's completely intended behaviour because it's possible SMF will generate topic=1.msg234 links where the message doesn't exist but relies on it matching the next message in the topic after that id.

Also the msg= link is created for quotes in 2.1 and probably should be used for the permalink as well.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.