# 500 Error message when I make a topic in a certain category (Infinite Flight Community)

**URL:** https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730
**Category:** Bug
**Created:** [2016年十二月24日 03:42 UTC](https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730 "2016-12-24T03:42:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![SingaporeBanana](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/singaporebanana/32/65465_2.png) [@SingaporeBanana](https://meta.discourse.org/u/SingaporeBanana)
#### Post date: [2016年十二月24日 03:42 UTC](https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730/1 "2016-12-24T03:42:43Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/3/6/36c04514bed7c8af396e4694abe119a42bc7eab3.jpg)

I don’t know why I can’t make a topic in a certain category (Features) today as the “500 Error” message keeps showing up. I did make a topic and forgot to move it to features, when I moved this, The message keeps showing 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: [2016年十二月26日 18:55 UTC](https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730/2 "2016-12-26T18:55:33Z")

</div>

Can we repro this @techapj?

---

<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: [2016年十二月27日 06:57 UTC](https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730/3 "2016-12-27T06:57:53Z")

</div>

There is a nasty error in Active Record, where adding a `#includes` on a model can cause various queries to explode when we pluck ids.

`op_likes` ordering (order by number of likes on first post) was a pretty hidden feature only exposed via the default category order dialog.

We are pulling the feature altogether, @techAPJ will pull it and add a migration that remaps this to order by likes for categories that want to specify it as ordering.

In the meantime @techAPJ changed the offending category on infinite flight to order by likes by default.

---

<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: [2016年十二月27日 08:09 UTC](https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730/4 "2016-12-27T08:09:57Z")

</div>

Actually looks like this is a legit bug in our monkey patch, so I went ahead and fixed the monkey patch, per:

[https://github.com/discourse/discourse/commit/d28d8a1f85abd3eaf874e048a0c6f2f5fc06e863](https://github.com/discourse/discourse/commit/d28d8a1f85abd3eaf874e048a0c6f2f5fc06e863)

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2016年十二月29日 17:56 UTC](https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730/5 "2016-12-29T17:56:12Z")

</div>

> [@sam](#):
>
> In the meantime @techAPJ changed the offending category on infinite flight to order by likes by default.

I reverted my change on `community.infinite-flight.com/c/features` just now to sort by Original Posts Lkes and can confirm that everything is good now. 👍

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [2016年十二月29日 17:56 UTC](https://meta.discourse.org/t/500-error-message-when-i-make-a-topic-in-a-certain-category-infinite-flight-community/54730/6 "2016-12-29T17:56:18Z")

</div>


