A user reported a bug where approving a post in a closed Discourse topic triggers a 500 Internal Server error. Although the original reporter tested on version 1.4.2, a maintainer clarified that the issue persists in version 1.5.2 and requested reproduction on the latest code. A developer confirmed they could reproduce the issue and acknowledged that the error message was unhelpful. The maintainer agreed that if a topic is closed or deleted, approval should fail gracefully with a clearer message. A fix was implemented to replace the server error with a user-friendly notification: “Something has gone wrong. Perhaps this topic was closed or deleted while you were looking at it?” See the fix commit.
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.
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: