Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How do I delete a topic?
judgej
✭
I tried deleting a topic with a comment, and the comment stayed around by itself. Then I tried to delete the comment, and the topic came back. The topic now still appears in the list of discussions, even though it is 'deleted'. If I view the topic details, it appears like this:
That's it - no further links or anything. I assume this isn't normal behaviour, so what could have happened? Could I have plugins interacting that cause the deletion process to fail at some point? Do I need to purge the topics marked for deletiong somehow? Is this a known bug caused by the sequence I went through to [attempt to] delete the topic?
Any help would be appreciated.
-- Jason
Edit: in case it helps, this topic was originally on a category that I deleted. I am wondering whether the moving of the topic from the deleted category to an existing category perhaps did not move everything across as it should have, causing the subsequent deletion to fail.
Public Category: My Topic
Bottom of Page
0
That's it - no further links or anything. I assume this isn't normal behaviour, so what could have happened? Could I have plugins interacting that cause the deletion process to fail at some point? Do I need to purge the topics marked for deletiong somehow? Is this a known bug caused by the sequence I went through to [attempt to] delete the topic?
Any help would be appreciated.
-- Jason
Edit: in case it helps, this topic was originally on a category that I deleted. I am wondering whether the moving of the topic from the deleted category to an existing category perhaps did not move everything across as it should have, causing the subsequent deletion to fail.
0
This discussion has been closed.
Comments
The difference between the two seems to be that the 'delete' link on the left will set the 'active' status of the discussion to '0', while the 'delete' link in the discussion itself does not.
The working link calls the /forums/ajax/switch.php page with function 'HideDiscussion'. The delete link in the discussion (to the right) is actually a 'delete comment' link, which is not very intuitive when there is just one comment (the initial comment that was added as a part of the discussion).
So the problem appears to be that all all comments can be deleted from a discussion, leaving just the discussion with no active comments on it. The problem is that the theme cannot handle that situation - it does not display a discussion with no comments sensibly, and fails to display the comment box to allow new comments to be added. There are a number of possible solutions that come to mind:
1. Fix the theme so it handles discussions with no comments, displaying some notification so say that "all comments have been deleted".
2. Delete or disable the discussion once the last comment has been deleted.
3. Prevent the last comment remaining from being deleted, so at least one must remain at all times.
4. Protect the first comment on the discussion (the 'head' comment) so it can never be deleted by itself, without hiding the whole discussion.
I'm not sure what the best approach would be. I'd be inclined to go for number 3, so the first comment added becomes a part of the discussion. The 'delete' link for that first comment would be relabelled 'delete discussion', and it would do just that.
Anyway I'll try to see what the others think about that idea.
Having the purge function would be handy, especially where data protection and privacy issues come into it (in the UK, if a user asks to have their information deleted, it MUST be fully deleted - you cannot simply hide it). But having a deleted comment or discussion simply hidden in the first instance is fine.
If I ever get threaded comments implemented, then deleting comments from the database would not be a good idea anyway, as it could mess up the hierarchies. Instead I would prefer a place-holder displayed to the visitors just saying "comment deleted" while retaining the hierarchy.
That will definately cut down on the head scratching.