Deleting a flagged post issue

(5an1ty) #1

a user has flagged a topic on my forum (It’s an empty thread with no replies), I click on delete and I get a message:
“something went wrong”

How do I find out what went wrong and how do I fix it?

(LoveDiscourse) #2

I just tried this myself and I can replicate it @codinghorror ?
Also why can’t a user delete his own thread? (He can delete his own reply to a thread but not the thread itself)

(Jeff Atwood) #3

For griefing reasons. Create a topic called “YOU ARE ALL JERKS!” then quickly delete it before anyone can flag it. Repeat over and over, etc.

I suggest reading this blog post:

(LoveDiscourse) #4

Ok and what about the something went wrong error? I have the same issue. I get a flag notification but as an admin I can only click on the hide button, the delete button gives me a “something has gone wrong” message.

(LoveDiscourse) #6

@zogstrip Any idea? Or tell us what logs to check?

(Régis Hanol) #7

Well, for starters, you should look at the rails log which is located in the /log/production.log file.

(Sam Saffron) #8

Can you explain the exact steps to repro, including your custom discourse settings.

(LoveDiscourse) #9

The error log:

Started DELETE "/posts/151" for {IP} at 2013-10-02 09:08:11 +0000
Processing by PostsController#destroy as */*
Parameters: {"id"=>"151"}
Rendered exceptions/not_found.html.erb within layouts/no_js (2.3ms)
Rendered common/_special_font_face.html.erb (1.2ms)
Rendered common/_discourse_stylesheet.html.erb (1.5ms)
Rendered text template (0.0ms)
Completed 403 Forbidden in 51ms (Views: 0.9ms | ActiveRecord: 19.3ms)

Does this help?

(LoveDiscourse) #10
  • Create a new thread
  • Flag your own thread
  • Go to the flags page and click delete

(Régis Hanol) #11

I can repro. Will fix.

It’s now fixed:

(Régis Hanol) #12