Incomplete topic titles beginning with a number can have odd behavior

If you put a title that starts with a number and that number coincides with a different topic ID. Then sharing or clicking on a direct link (without the post ID) automatically redirects you to the clashing topic.

For example this post title starts with 101646 which is the POST ID of another topic (this one)

But then if I post a link to this

https://meta.discourse.org/t/101646-12-42-interesting-bug-maybe

Copy paste works best for this example

Which is the URL of this (current) topic it redirects to the Topic List Preview (unless I provide the /153975) at the end.

However any other post I can l link to directly as long as they don’t have a shared ID at the beginning of the URL
IE:

https://meta.discourse.org/t/install-plugins-in-discourse

Redirects propely.

If it doesn’t have the topic ID, I’m sure it’s doing a lookup, and your number URL confuses that function.

Not sure it’s a bug, since Discourse doesn’t share URLs sans topic ID.

2 Likes

Sure mayhaps not a bug just an interesting observation. The link does work though if the number doesn’t clash… so still a bit odd

You just need the topic ID, the rest of it is parsed. For instance, this topic is available at https://meta.discourse.org/t/123-numbers-dont-mean-a-thing/153975.

That means you can fix errors in the title/URL, without having to fix existing links. Pretty neat. :slight_smile:

1 Like

Interesting but if you don’t have a Topic ID it does (generally) find the right topic based on the title.

No, that is incorrect, the URL of this topic is
https://meta.discourse.org/t/101646-12-42-interesting-bug-maybe/153975, not https://meta.discourse.org/t/101646-12-42-interesting-bug-maybe/

So if you’re entering an incomplete topic URL then it will try to resolve it - using the number…

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.