XF 2.2 Pruning soft deleted posts, profile posts etc.

voom

Active member
I really wonder why there is no function like that, and also no addon that completely takes care of this.

There is @AndyB s "Show deleted" that can hard delete soft deleted posts and threads, though without exceptions or filters. I can work with that.

But what about soft deleted profile posts? If I allow my users to delete their profile posts, which I find a necessity given the point of profile posts, any deleted profile posts will be soft deleted. I cannot even give them the permission to hard delete their posts. So stuff that clearly should be gone, lingers around in the profiles forever.

Hard deleting all profile posts posted by a user of course is no option either.

Coming from Woltlab Suite, I assumed that for sure there must be a function to batch prune data that has no use any more. Is there at least maybe a safe SQL query that could help with that?
 
It seems relatively easy to filter the profile posts and comments with the state "deleted" and delete them permanently.

But I found that a comment to a deleted profile post, while being of no more use, does not have the state "deleted" but remains "visible". So if I delete "deleted" profile posts and comments, any comments to deleted posts will be unconnected and of no more use, but still "visible".

At least, if there is to be no way to prune that data via the ACP, the comments to deleted profile posts should get the state "deleted" as well. Only then at least one could work around the missing function by going to the db directly.
 
Last edited:
Is there at least maybe a safe SQL query that could help with that?
definitely no! With such a complex system like XF you should avoid messing around in the database :-/

Regarding Threads: If you don't know, there is "Batch update threads": admin.php?threads/batch-update. With that function you can delete all or certain soft deleted threads permanently. Unfortunately in XF core there is not such a thing for single posts in threads or profile posts.
 
As I said, I know how to deal with threads and posts. This is about profile posts and their comments. Users can't hard delete them, and an admin cannot hard delete them in bulk. So they are bound to stay there forever for no good reason.

Unfortunately in XF core there is not such a thing for [...] profile posts.
There is no such thing in core and no addon to deal with it, either...

definitely no! With such a complex system like XF you should avoid messing around in the database :-/
Even more reason to address this issue with an addon or a core function....
 
Last edited:
Two things I could think of, that they would be relevant, are attachments and reactions that are connected to deleted profile posts and comments. They probably would end up "orphaned", too. BTW what happens, if a deleted profile post with visible comments were hard deleted manually in the frontend? Would that take care of the resp. comments and attachments, too? If yes, would it be that hard to include that in a batch job, that it is even necessary to discuss about it being "wanted" or not by enough people?

Why not extend the existing mechanism used for threads to posts and profile posts + comments?
 
Back
Top Bottom