# 帖子已被删除，显示为隐藏在主题中，数据库中未标记为隐藏或已删除

**URL:** https://meta.discourse.org/t/post-is-deleted-and-shows-as-hidden-in-topic-not-marked-as-hidden-or-deleted-in-db/82216
**Category:** Support
**Created:** [2018 年3 月 5 日 14:09 UTC](https://meta.discourse.org/t/post-is-deleted-and-shows-as-hidden-in-topic-not-marked-as-hidden-or-deleted-in-db/82216 "2018-03-05T14:09:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### 作者： ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### 发布日期： [2018 年3 月 5 日 14:09 UTC](https://meta.discourse.org/t/post-is-deleted-and-shows-as-hidden-in-topic-not-marked-as-hidden-or-deleted-in-db/82216/1 "2018-03-05T14:09:17Z")

</div>

I am working on metrics and doing some crosscheck to make sure that my data is correct. I was looking at a specific post that I deleted and it shows as hidden in the topic view:

![image](https://global.discourse-cdn.com/meta/original/3X/a/1/a111fb0316dedcb06b8535ecddf36b3f2d565a64.png)

but in the database the `hidden` field is `false` and the `deleted_at` field is `NULL`.

Is this a bug or should I be looking at some other field / somewhere else?

---

<div class="post-metadata">

### 作者： ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### 发布日期： [2018 年3 月 5 日 18:40 UTC](https://meta.discourse.org/t/post-is-deleted-and-shows-as-hidden-in-topic-not-marked-as-hidden-or-deleted-in-db/82216/2 "2018-03-05T18:40:25Z")

</div>

The `hidden` field won’t necessarily be set, but the `deleted_at` field should be set. Are you sure you’re looking at the right post? Through the rails console you’ll need to search with something like `Post.with_deleted.where("topic_id = ? AND deleted_at IS NOT NULL", your_topic_id)`

---

<div class="post-metadata">

### 作者： ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### 发布日期： [2018 年3 月 5 日 18:44 UTC](https://meta.discourse.org/t/post-is-deleted-and-shows-as-hidden-in-topic-not-marked-as-hidden-or-deleted-in-db/82216/3 "2018-03-05T18:44:55Z")

</div>

So it’s a bit weird - I just checked back and that post is now deleted in the db… Not sure why it took awhile to refresh but we’re good.

---

<div class="post-metadata">

### 作者： ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### 发布日期： [2024 年6 月 8 日 12:37 UTC](https://meta.discourse.org/t/post-is-deleted-and-shows-as-hidden-in-topic-not-marked-as-hidden-or-deleted-in-db/82216/4 "2024-06-08T12:37:47Z")

</div>

此主题已在 2286 天后自动关闭。不再允许回复。
