# 用户一旦发布回复便无法删除自己的主题

**URL:** https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853
**Category:** Feature
**Created:** [2018年五月5日 21:52 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853 "2018-05-05T21:52:15Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![testingsoftware](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@testingsoftware](https://meta.discourse.org/u/testingsoftware)
#### Post date: [2018年五月5日 21:52 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/1 "2018-05-05T21:52:15Z")

</div>

您好，

我可能漏掉了什么显而易见的内容，但就是没发现。

帖子菜单中应显示的项目如下：

 ![delete](https://global.discourse-cdn.com/meta/original/3X/5/b/5be7993563c7dec02ec807e022a860e20436cb46.PNG)

管理员可以看到上述内容，但用户看到的选项较少：

 ![nodelete](https://global.discourse-cdn.com/meta/original/3X/9/3/9387e9591a1a91d80eefd92a811adb087edcf844.PNG)

有什么建议吗？

谢谢。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2018年五月5日 23:06 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/2 "2018-05-05T23:06:37Z")

</div>

You can delete posts, but not topics. (I can’t quite tell from your picture if you’re trying to delete a topic).

---

<div class="post-metadata">

### Author: ![testingsoftware](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@testingsoftware](https://meta.discourse.org/u/testingsoftware)
#### Post date: [2018年五月5日 23:18 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/3 "2018-05-05T23:18:13Z")

</div>

Thanks, that’s why then! It was a topic.

Although maybe it would be a good thing if users could delete a topic as long as it didn’t have any replies.

Cheers!

---

<div class="post-metadata">

### Author: ![madrush](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/madrush/32/119502_2.png) [@madrush](https://meta.discourse.org/u/madrush)
#### Post date: [2019年三月10日 20:13 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/4 "2019-03-10T20:13:16Z")

</div>

> [@testingsoftware](#):
>
> Although maybe it would be a good thing if users could delete a topic as long as it didn’t have any replies.

I agree. I’ve just run into this with a regular member who is leading a group in our forum. I set up a category for them to play with, but they cannot delete their topics—even those without any replies.

---

<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: [2019年三月12日 00:16 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/5 "2019-03-12T00:16:03Z")

</div>

The current workaround here is to ask them to flag, in practice posting a topic and then changing mind about it is quite rare.

If we wanted to be ultra fancy here I guess we could allow end users to tombstone and close the topic if it has no replies (waiting 24 hours till actual deletion). In practice we find it ultra rare for users to change mind about posting a topic. If they do they usually follow up with, can you please close this it is a duplicate of: `<link to topic>` (either in a flag or followup reply)

---

<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: [2019年三月12日 11:09 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/6 "2019-03-12T11:09:37Z")

</div>

> [@sam](#):
>
> we could allow end users to tombstone and close the topic if it has no replies (waiting 24 hours till actual deletion)

Yes, why don’t we do that? And only for, say, the first day after creating it if there’s some kind of “topic creator’s remorse” or .. something.

---

<div class="post-metadata">

### Author: ![madrush](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/madrush/32/119502_2.png) [@madrush](https://meta.discourse.org/u/madrush)
#### Post date: [2019年三月12日 17:36 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/7 "2019-03-12T17:36:24Z")

</div>

That sounds reasonable and just fancy enough. Sometimes if a topic doesn’t get any replies, it is good to have a way to kill it off. We’ve also had cases where a new category is seeded with topics before being opened up to other members, and some of those topics need to be deleted before the category going live.

---

<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: [2019年三月12日 22:47 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/8 "2019-03-12T22:47:38Z")

</div>

@zogstrip can you spec and assign this? It should behave very similarly to post deletion with additional limits (no replies, only created in the last 24 hours, etc).

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2019年三月21日 11:46 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/9 "2019-03-21T11:46:27Z")

</div>

@nbianca, can you take this?

We need to allow any users to delete their own topic provided it was created in the past 24 hours and there hasn’t been any replies yet.

Deleting your own topic will make a new revision and put a stub in place (only for non-staff members) like we do for any other posts except the text will be different. Something like

> (topic withdrawn by author, will be deleted in 24 hours unless flagged)

The stub will be destroyed after 24 hours by the `DestroyOldDeletionStubs` job.

---

<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: [2019年三月21日 12:06 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/10 "2019-03-21T12:06:06Z")

</div>

> [@zogstrip](#):
>
> put a stub in place (only for non-staff members)

I think that stub is visible to all users. It is a public notice of intent to withdraw.

Within 24 hours of posting the topic and zero replies seems safe. Note that replies _after_ the intent to withdraw is in place may be implicitly deleted as well but nobody can say they were not warned…

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2019年三月21日 13:36 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/11 "2019-03-21T13:36:45Z")

</div>

> [@codinghorror](#):
>
> I think that stub is visible to all users. It is a public notice of intent to withdraw.

I meant we only put the stub when a non-staff user delete their own topic. This logic should not apply to staff.

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [2019年三月27日 11:55 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/12 "2019-03-27T11:55:58Z")

</div>

This is done in:

[https://github.com/discourse/discourse/pull/7267](https://github.com/discourse/discourse/pull/7267)

---

<div class="post-metadata">

### Author: ![ralph1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@ralph1](https://meta.discourse.org/u/ralph1)
#### Post date: [2019年四月18日 02:56 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/13 "2019-04-18T02:56:44Z")

</div>

This doesn’t seem to work. We just had our first user create and delete their own topic. Another user came along and posted a reply before the 24-hour period was up. The time period has now expired and the topic was not removed.

---

<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: [2019年四月18日 03:01 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/14 "2019-04-18T03:01:40Z")

</div>

Yes, that’s possible, the topic can’t be removed if there are replies to it – then one user would indirectly be deleting another user’s posts.

The idea is that stating public intent to delete in the first and only post of the topic should be enough notice that people shouldn’t reply to the topic. Odd that someone ignored that road sign 🛑

---

<div class="post-metadata">

### Author: ![ralph1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@ralph1](https://meta.discourse.org/u/ralph1)
#### Post date: [2019年四月18日 06:13 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/15 "2019-04-18T06:13:42Z")

</div>

You wrote above that “replies after the intent to withdraw is in place will be implicitly deleted as well”. Now you’re saying the topic can’t be removed if there are replies to it. Which is it supposed to be? Make up your mind, please. Or perhaps the topic should close when withdrawn to prevent any replies.

---

<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: [2019年四月18日 06:46 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/16 "2019-04-18T06:46:22Z")

</div>

I guess I did say that… I’m still hesitant to have one user delete another user’s posts, even if accidentally. What do you think @eviltrout?

In the meantime, I’m giving some delete functions a little exercise myself 😅

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2019年四月18日 16:20 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/18 "2019-04-18T16:20:26Z")

</div>

Could we perhaps disable replies until the 24 hour period is up?

---

<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: [2019年四月18日 20:21 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/19 "2019-04-18T20:21:36Z")

</div>

Easiest way to do that is to make a topic self delete also close the topic at the time the intent to delete is stated? @nbianca can you take that?

---

<div class="post-metadata">

### Author: ![ralph1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@ralph1](https://meta.discourse.org/u/ralph1)
#### Post date: [2019年四月18日 21:05 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/20 "2019-04-18T21:05:09Z")

</div>

Can users undelete and re-open the topic if they change their mind?

---

<div class="post-metadata">

### Author: ![k4rtik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/k4rtik/32/119508_2.png) [@k4rtik](https://meta.discourse.org/u/k4rtik)
#### Post date: [2019年四月23日 11:56 UTC](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853/21 "2019-04-23T11:56:56Z")

</div>

One question and one issue to report:

Q: Does replying to a deleted topic in the form of a new personal message also invoke the topic-replied workflow? I ask because one user created and then deleted a topic within minutes early yesterday, there are no replies on it but I did send a reply as a personal message yesterday. It’s been over 36 hours, but the topic has not been auto-deleted (there are no flags either).

Bug/issue: This topic seems to be included in the summary emails as I can confirm from the “Preview Summary” (with an empty body but showing the title and info about the user who posted it). This is certainly undesired, deleted topics should be filtered out.

[下一頁](https://meta.discourse.org/t/user-cannot-delete-own-topics-once-they-have-replies/86853.md?page=2)
