# Unlisting a thread breaks links that have old thread names

**URL:** https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440
**Category:** Feature
**Tags:** unlisting
**Created:** [August 20, 2017, 10:23pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440 "2017-08-20T22:23:27Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Drew\_Warwick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/drew_warwick/32/80591_2.png) [@Drew\_Warwick](https://meta.discourse.org/u/Drew_Warwick)
#### Post date: [August 20, 2017, 10:23pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/1 "2017-08-20T22:23:27Z")

</div>

### The Bug:

A Discourse topic link looks like this:

[https://meta.discourse.org/t/welcome-to-meta-discourse-org/1?silent=true](https://meta.discourse.org/t/welcome-to-meta-discourse-org/1?silent=true)

Normally the title, the bit between the `/t/` and `/topicId` at the end, does not matter, so I could change it to anything and it would still redirect to the same topic so long as the topicId is correct:

[https://meta.discourse.org/t/welcome-to-hell/1?silent=true](https://meta.discourse.org/t/welcome-to-hell/1?silent=true)

This is great behavior because if the topic’s name is changed, old links to it still work. However, this behavior is broken with unlisted threads. Unlisted threads can only be accessed with the current title, and all other links are broken – they do not redirect.

### Use Case:

Our forum has community mentors that PM users to suggest how they can improve their posts. We link the threads that warrant the PMs on a spreadsheet so other mentors don’t send duplicate PMs and moderators can occasionally review us. If our site moderators unlist a thread that has had its name changed since the link was entered into the spreadsheet, the link in the spreadsheet is now broken, and the site moderators have to search all topics by the user to find the thread.

_(Edited by @tobiaseigen to append `?silent=true` to links, so they don’t appear on the welcome topic)_

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 20, 2017, 10:27pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/2 "2017-08-20T22:27:20Z")

</div>

That does seem like a bug since Discourse should only care about the topic id, can you take a look @tgxworld

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [August 21, 2017, 9:59am UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/4 "2017-08-21T09:59:58Z")

</div>

I’m pretty sure this was introduced intentionally, to ensure that the URLs of unlisted topics cannot be guessed by enumerating IDs.

Update: Ah, found it:

> [@Mod can't see unlisted posts](https://meta.discourse.org/t/mod-cant-see-unlisted-posts/45549/4):
>
> This is my regression which I will get fixed, it is due to: [https://github.com/discourse/discourse/commit/3015030fe21a120f42aadcdd14e84cb3e964f873](https://github.com/discourse/discourse/commit/3015030fe21a120f42aadcdd14e84cb3e964f873) In the past we used to run all requests to unlisted topics via the “auto correct slug” logic, this was a security hole allowing users to simply guess the URL of unlisted topics. Now we expect the slug to match exactly for unlisted stuff. Somehow clicks from the front page are relying on the redirect logic, which is a performance issue anyway. work…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 21, 2017, 12:52pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/5 "2017-08-21T12:52:27Z")

</div>

Yeah this is totally by design, I don’t see this as a bug.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [August 21, 2017, 1:06pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/6 "2017-08-21T13:06:14Z")

</div>

There is room for improvement, however:  
We could re-enable the redirect for staff users – they have visibility into unlisted topics anyways.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 21, 2017, 1:07pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/7 "2017-08-21T13:07:09Z")

</div>

Sure, I am not against that, will make this a “feature” then.

---

<div class="post-metadata">

### Author: ![Drew\_Warwick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/drew_warwick/32/80591_2.png) [@Drew\_Warwick](https://meta.discourse.org/u/Drew_Warwick)
#### Post date: [August 21, 2017, 1:08pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/9 "2017-08-21T13:08:58Z")

</div>

If a mod doesn’t want a thread to be visible at all, shouldn’t they just delete it? From what I understand (rather, at least what we use it for in our forum), unlisting is more for just clearing up clutter.

For instance, when we merge two threads we unlist the duplicate so we don’t have topics that pop up in the search and 5/6 of them are locked. We also unlist topics like “Look what I had for breakfast!”. If someone finds these by Id scraping, then cheers to them.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 21, 2017, 1:12pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/10 "2017-08-21T13:12:51Z")

</div>

That is not the only way moderators use this, so we have to err on the side of caution.

---

<div class="post-metadata">

### Author: ![Drew\_Warwick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/drew_warwick/32/80591_2.png) [@Drew\_Warwick](https://meta.discourse.org/u/Drew_Warwick)
#### Post date: [August 21, 2017, 1:51pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/11 "2017-08-21T13:51:46Z")

</div>

At the very least, it would be nice for links to redirect for unlisted topics if the name was ever valid. The server’s logic might look something like:

- This user gave me a link. What thread does it go to?
- I found the thread, but it’s unlisted
- Has the title in the link the user gave me ever been the title for this topic (in edit history perhaps)?
  - Yes: Redirect to topic
  - No: Redirect to thread not found page

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 21, 2017, 1:56pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/12 "2017-08-21T13:56:02Z")

</div>

> [@Drew\_Warwick](#):
>
> if the name was ever valid

This is pretty much a GIANT enormous piece of work with perf considerations. I would be pretty strongly against it.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 21, 2017, 5:59pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/13 "2017-08-21T17:59:44Z")

</div>

I am fine with the staff improvement here, that you don’t need to know the slug of an unlisted topic if you are staff. But if that does not address Drew’s issue and Sam’s performance issue then maybe best to leave this “as designed”.

---

<div class="post-metadata">

### Author: ![Drew\_Warwick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/drew_warwick/32/80591_2.png) [@Drew\_Warwick](https://meta.discourse.org/u/Drew_Warwick)
#### Post date: [August 21, 2017, 6:44pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/14 "2017-08-21T18:44:31Z")

</div>

Yeah, we are technically not staff (volunteers closer to the Regular role). A permission for trust levels or groups would cover our use case since name history isn’t performant.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [September 3, 2017, 9:37am UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/15 "2017-09-03T09:37:29Z")

</div>

A post was split to a new topic: [Unlisted only means not listed in topics list](https://meta.discourse.org/t/unlisted-only-means-not-listed-in-topics-list/69278)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 26, 2017, 10:00pm UTC](https://meta.discourse.org/t/unlisting-a-thread-breaks-links-that-have-old-thread-names/68440/16 "2017-08-26T22:00:00Z")

</div>

This topic was automatically closed after 4 days. New replies are no longer allowed.
