# Strange topic won't display

**URL:** https://meta.discourse.org/t/strange-topic-wont-display/29123
**Category:** Support
**Created:** [May 22, 2015, 12:48pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123 "2015-05-22T12:48:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [May 22, 2015, 12:48pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/1 "2015-05-22T12:48:25Z")

</div>

So in my `/latest` I have an entry of the following:

![](https://global.discourse-cdn.com/meta/optimized/3X/e/9/e9c055beb3d0694b05bdeb055e43b18e61bbc902_2_690x46.png)

However, if I try to read it, I only see a blank page with the title in the top bar if I make the browser size small enough and “scroll” up:

 ![](https://global.discourse-cdn.com/meta/original/3X/3/7/37e6142e323f9f12e97bb777872105fa555d1856.png) 

If I use the magic undocumented `/raw/` URL, I get the “The page you requested doesn’t exist or is private.” message. Also note above, the value of **Replies** is `-1`.

This happens with or without customizations enabled.

Any ideas? The actual post is at:

[https://talk.openmrs.org/t/are-we-being-excessive-in-not-allowing-re-saving-of-orderfrequency-once-its-in-use/1946](https://talk.openmrs.org/t/are-we-being-excessive-in-not-allowing-re-saving-of-orderfrequency-once-its-in-use/1946)

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [May 22, 2015, 3:07pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/2 "2015-05-22T15:07:53Z")

</div>

One more thing, this topic was created by email … not sure if that makes a difference.

---

<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: [May 22, 2015, 9:26pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/3 "2015-05-22T21:26:01Z")

</div>

Anything in /logs about this? It looks like the topic was somehow invalid.

There’s also an error in the JS console if you use f12 to view it.

```
TypeError: Cannot read property 'get' of undefined
    at eval (eval at <anonymous> (https://talk.openmrs.org/assets/application-d84f137dac5e576f8099b899bd60d681.js:1:256144), <anonymous>:37:36)
    at tryCatch (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:44875:16)
    at invokeCallback (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:44887:17)
    at publish (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:44858:11)
    at eval (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:26584:7)
    at Queue.invoke (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:872:18)
    at Object.Queue.flush (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:937:13)
    at Object.DeferredActionQueues.flush (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:742:19)
    at Object.Backburner.end (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:167:27)
    at Object.Backburner.run (eval at <anonymous> (https://talk.openmrs.org/assets/vendor-6bf32a916dad1985b0362055d3458364.js:1:427441), <anonymous>:222:20)

```

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [May 26, 2015, 2:54pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/4 "2015-05-26T14:54:06Z")

</div>

> [@codinghorror](#):
>
> Anything in /logs about this? It looks like the topic was somehow invalid.

Nope, the only thing at all is an unrelated `ActionView::Template::Error` about `/latest.rss`.

I re-created the topic from the original email – is there any easy way to just delete the topic somehow without being able to access the wrench menu? DB?

---

<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: [May 26, 2015, 2:57pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/5 "2015-05-26T14:57:39Z")

</div>

> [@downey](#):
>
> is there any easy way to just delete the topic somehow without being able to access the wrench menu? DB?

If you have the ID, then

```plaintext
# ssh into server
cd /var/discourse
./launcher enter app
rails c
t = Topic.find(<id>)
PostDestroyer.new(Discourse.system_user, t.posts.first).destroy

```

should be enough.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [May 26, 2015, 2:58pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/6 "2015-05-26T14:58:52Z")

</div>

> [@zogstrip](#):
>
> If you have the ID

Just to confirm, when you say ID, you’re saying the integer like `29123` is for this topic?

---

<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: [May 26, 2015, 3:08pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/7 "2015-05-26T15:08:09Z")

</div>

Exactly. I meant the “topic id”.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [May 26, 2015, 3:16pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/8 "2015-05-26T15:16:25Z")

</div>

> [@zogstrip](#):
>
> PostDestroyer.new(Discourse.system\_user, t.posts.first).destroy

Oops, no luck:

```plaintext
[2] pry(main)> t = Topic.find(1946)
=> #<Topic id: 1946, title: "Are we being excessive in not allowing re-saving o...", last_posted_at: nil, created_at: "2015-05-22 00:50:51", updated_at: "2015-05-22 00:50:51", views: 24, posts_count: 0, user_id: 81, last_post_user_id: 81, reply_count: 0, featured_user1_id: nil, featured_user2_id: nil, featured_user3_id: nil, avg_time: nil, deleted_at: nil, highest_post_number: 0, image_url: nil, off_topic_count: 0, like_count: 0, incoming_link_count: 0, bookmark_count: 0, category_id: 8, visible: true, moderator_posts_count: 0, closed: false, archived: false, bumped_at: "2015-05-22 00:50:51", has_summary: false, vote_count: 0, archetype: "regular", featured_user4_id: nil, notify_moderators_count: 0, spam_count: 0, illegal_count: 0, inappropriate_count: 0, pinned_at: nil, score: nil, percent_rank: 0.0, notify_user_count: 0, subtype: nil, slug: "are-we-being-excessive-in-not-allowing-re-saving-o...", auto_close_at: nil, auto_close_user_id: nil, auto_close_started_at: nil, deleted_by_id: nil, participant_count: 1, word_count: nil, excerpt: nil, pinned_globally: false, auto_close_based_on_last_post: false, auto_close_hours: nil>

[3] pry(main)> PostDestroyer.new(Discourse.system_user, t.posts.first).destroy
NoMethodError: undefined method `trash!' for nil:NilClass
from /var/www/discourse/lib/post_destroyer.rb:73:in `block in perform_delete'

```

---

<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: [May 26, 2015, 3:39pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/9 "2015-05-26T15:39:52Z")

</div>

Ok, try the nuclear option: `Topic.find(<id>).destroy`

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [May 26, 2015, 3:42pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/10 "2015-05-26T15:42:05Z")

</div>

💥

That worked. Thanks. 🙂

---

<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: [May 26, 2015, 3:42pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/11 "2015-05-26T15:42:19Z")

</div>



---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [May 26, 2015, 7:57pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/12 "2015-05-26T19:57:29Z")

</div>

> [@downey](#):
>
> [3] pry(main)\> PostDestroyer.new(Discourse.system\_user, t.posts.first).destroy  
> NoMethodError: undefined method `trash!’ for nil:NilClass

> [@zogstrip](#):
>
> Ok, try the nuclear option: Topic.find(\<id\>).destroy

> [@downey](#):
>
> That worked. Thanks.

… which implies that the problem was that the topic _had no first post_.

---

<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: [May 26, 2015, 9:52pm UTC](https://meta.discourse.org/t/strange-topic-wont-display/29123/13 "2015-05-26T21:52:05Z")

</div>

Indeed, but the real mystery is _ **why** _?
