Advertisement:

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

Offline digger

  • Sr. Member
  • ****
  • Posts: 738
  • 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

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 17,574
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • 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.

A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline digger

  • Sr. Member
  • ****
  • Posts: 738
  • 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: 69,584
    • StoryBB/StoryBB 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sesquipedalian

  • The Mad Doctor
  • Lead Developer
  • Full Member
  • *
  • Posts: 401
  • Gender: Male
  • It works! ... in theory.
    • Sesquipedalian on GitHub
Re: Not a bug, but wrong behavior
« Reply #4 on: February 21, 2018, 03:11:19 AM »
Also the msg= link is created for quotes in 2.1 and probably should be used for the permalink as well.

https://github.com/SimpleMachines/SMF2.1/pull/4555
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.