# Approve post in closed topic leads to internal server error

**URL:** https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365
**Category:** Bug
**Created:** [2016年六月7日 10:21 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365 "2016-06-07T10:21:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![chipi92](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chipi92/32/116706_2.png) [@chipi92](https://meta.discourse.org/u/chipi92)
#### Post date: [2016年六月7日 10:21 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365/1 "2016-06-07T10:21:33Z")

</div>

Create a thread.  
Try to post with an account with no enough permissions. The post will be up for approval.  
Close the thread.  
Try to approve the post leads to 500 Internal Server error popup.

Opening the thread again and approving the post worked.

Discourse 1.4.2

---

<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年六月7日 19:39 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365/2 "2016-06-07T19:39:31Z")

</div>

Can you update to latest and try again? We don’t usually fix bugs in old versions unless they are security issues.

---

<div class="post-metadata">

### Author: ![chipi92](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chipi92/32/116706_2.png) [@chipi92](https://meta.discourse.org/u/chipi92)
#### Post date: [2016年六月7日 21:51 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365/3 "2016-06-07T21:51:55Z")

</div>

It keeps happening on Discourse 1.5.2

---

<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年六月22日 01:30 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365/4 "2016-06-22T01:30:55Z")

</div>

No, I meant on latest 1.6 beta code. That code is quite old. We don’t fix minor bugs in old versions unless they are security issues.

@techapj can you repro this?

---

<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年六月22日 17:17 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365/5 "2016-06-22T17:17:10Z")

</div>

I can repro this issue on latest verison. Added on my list. ✏

---

<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年六月24日 10:31 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365/6 "2016-06-24T10:31:39Z")

</div>

> [@chipi92](#):
>
> Close the thread.  
> Try to approve the post leads to 500 Internal Server error popup.

Yes, that is correct. If the topic is closed or deleted, approving the post (in that topic) should not work. I agree that error message can be improved. Done via:

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

Now the error message will be:

> Something has gone wrong. Perhaps this topic was closed or deleted while you were looking at 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: [2016年六月24日 10:37 UTC](https://meta.discourse.org/t/approve-post-in-closed-topic-leads-to-internal-server-error/45365/7 "2016-06-24T10:37:57Z")

</div>


