PSA: Avoiding incoming link breakage to this forum

I’ve run into some broken extenal links to topics here. This happens after a topic gets renamed. It seems that Discourse is quite flexible with incoming urls, but this can lead to some pitfalls. Here is the full url to a topic: https://community.openstreetmap.org/t/proposal-to-add-the-emoji-as-a-reaction/107167. It turns out the url still works with the number at the end removed: https://community.openstreetmap.org/t/proposal-to-add-the-emoji-as-a-reaction. However if the topic title changes, the url slug also changes and the numberless url stops working. The url with the number at the end continues working because the number is the unique identifier of the topic. In fact all of these links work purely based on the ID:

A bit more explanation here.

Summary: Keep the numeric ID in the URL when linking to this forum and your links will survive topic name changes.

16 Likes

It is also relevant for url-shortening, this topic here will always be found under https://c.osm.org/t/108518

5 Likes