Deleted Topics - where are they?

(phil) #1

I am trying to see where are the deleted topics but I can’t find them anywhere.
I am running the latest version 1.2.0.beta2.

I assume they are still in the system after being deleted because my embedded code is not showing me a message saying I can’t access that page anymore.

I wish I could delete them completely. Right now my only solution is to hack the content of ‘discourseEmbedUrl’… not great.

(Dave McClure) #2

Deleted posts are just flagged as hidden.

They do get completely deleted after 30 days if you have this site setting enabled (which it is by default)

(phil) #3

yeah I see deleted POST are hidden and can be seen
But I am asking about deleted TOPICS :slight_smile: where are these little guys ?

I realize that IF I have the topic url , then I can go and un-delete them or what not…
But what if I don’t have the topics urls… and i want to see all deleted topics ? any way of doing that ?

(Régis Hanol) #4

Not right now. You can still see them in the database though.

(cpradio) #5

I’ve thought about adding an advanced querystring (think along the lines of ?status=invisible, maybe ?status=deleted) to do this. Do you foresee any issues with the approach?

Is there anything that would make it increasingly difficult?

(Régis Hanol) #6

You need to make sure no topics bleed out but other than that it should be pretty straightforward.

(cpradio) #7

Good Good. Consider that on my plate then :smile:

(Jeff Atwood) #8

No this is 100% incorrect. Deleted posts are not completely deleted.

The setting you are referring has to do with hidden posts, but the OP is asking about deleted topics.

Also you can see deleted posts and topics by visiting the user page (of the user who owns the deleted content) and clicking on the deleted count there. That’s the only way at the moment.

Deleting posts/topics/uploads
(cpradio) #10

Nevermind, I found it. I was looking in the Admin User Profile page :slight_smile: It is the Public Profile Page.

(cpradio) #11

I’m digging into this a bit and it may be a bit more complicated (meaning, it could allow bleeds easily). It seems that deleted_at IS NULL check is built into Topic as that condition doesn’t exist within topic_query.rb, so that leads me to believe it is part of topic.rb by default.

Changing that default, is a serious bleed that has to be patched.

Am I on the right track or missing something obvious?

(phil) #12

The user profile deleted “count” seems to only list the topic deleted as well. No sign of the topics deleted as far as I can see.

Topic embedding - refresh
(Kane York) #13

What happens if you start the query with Topic.unscoped.where(....)...?

(cpradio) #14

I’ll have to give that a shot when I get home :slight_smile: (and research what unscoped does) :smile:

(cpradio) #15

PR Sent


Did this change in the latest version? I’m can’t find a topic I deleted.

(Mittineague) #17

AFAIK as long as you’re a Mod you can go to your Profile and click “deleted posts” to see them.

(Jeff Atwood) #18

This may not list topics you own that you deleted, unfortunately. @zogstrip is looking into it.

(Régis Hanol) #19

There actually was an explicit check not to show your own deleted posts/topics. It’s now fixed :horse:

(Sam Saffron) #20

I intend to add admin search for this but it requires some serious hacking inside rails.

(Ivan Rapekas) #21

Hi, what’s going on on deleted topics (not own)?

Am I right that finding deleted topics is still available only with ?status=deleted param?:slightly_smiling_face:
I found that after deleting some user’s topic as admin it doesn’t appear at user/deleted-posts page. The title of the topic began with a number, then after delete, there was no way to access it by slug because Discourse transformed it immediately. If I were an author of the topic, I could find the deleted one at user’s profile.