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?

judgejjudgej
edited December 2008 in Vanilla 1.0 Help
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:

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.

Comments

  • Can you delete it using the link on the left instead of the link on the right? If you use the one on the right, it deletes the first comment in the discussion but not the discussion itself.
  • judgejjudgej
    edited December 2008
    Yes. I didn't notice that link. Thanks.

    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.
  • SS ✭✭
    I dont red all, but may be it helps to solve your problem. Comment Removal 2.1.2
  • The comment-removal plugin is like a purge function, removing all traces of a discussion, while plain Vanilla just marks things as deleted?
  • I agree it is something that should be changed, you aren't the first person to encounter this problem and occasionally we do get people commenting on the forum about it if they miss the link on the left. Personally I think it would be best to change the behaviour of the delete link if there is only one comment in the discussion to call HideDiscussion(). I don't think it is a great idea to physically delete a discussion from the database without giving a user a careful warning about it, you never know if you will want to see that discussion again in the future.
    Anyway I'll try to see what the others think about that idea.
  • judgejjudgej
    edited December 2008
    You are for option 2 then. I'm easy either way.

    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.
  • I have added a fix to the repository, hopefully we will see it in 1.1.6. It changes the "delete" link of the first comment in a discussion to "delete discussion" instead.
  • Cool :-)

    That will definately cut down on the head scratching.
This discussion has been closed.