Issues deleting categories/posts

(Perry Huang) #1

Hi all,

I created a new Discourse forum and I’ve been playing around. I really like the experience so far. Here are a couple issues I’m currently facing.

  1. It seems to me that a category needs to be empty before it is deleted. I have a category that was renamed from one of the default categories from a fresh installation that I cannot delete.

category url:
screenshot of “edit” menu: Imgur: The magic of the Internet

  1. I ran into a thread that doesn’t seem to be able to be deleted.

thread url:
this thread’s settings menu: Imgur: The magic of the Internet

If anyone can help me out, I’d appreciate it! Thanks.


(Jeff Atwood) #2

As for the second item, simply click the delete icon on the first post to delete the topic.

(Perry Huang) #3

I don’t think the delete button is present. I’ve seen a trash can icon on other posts that I’ve used to delete posts with. Thanks!

(Jeff Atwood) #4

Looks like you are not logged in as an Admin. Try again when logged in as an admin and you will see a delete icon, it might be behind the ellipsis … but it will be there.

(Perry Huang) #5

I figured out why I couldn’t delete that post. The post is used for the description of the category and it’s not visible to users as long as it’s been edited.


(PJH) #6

Might as well post here, since I’ve got a similar problem; I have a category I want to delete, but there doesn’t appear to be a Delete button. I’ve no idea if it was a previously default category that was renamed.

There are no additional posts in the category, only the initial post that’s created upon category creation.

Any clues?

(Jeff Atwood) #7

I see that one too. I thought maybe because it was a subcategory, but I moved it out of subcategory and that didn’t seem to matter.

@neil I’ll need you to take a look, I wonder if there’s some API calls they made within this category that caused leftover stuff. Would be nice to have the dialog explain exactly why it is not showing the delete button.

(Neil Lalonde) #8

I can’t reproduce any of those scenarios, but I’m guessing there are invisible topics that I have no way of finding without looking at the db directly.

Maybe we need to always show the Delete Category button and:

  • if the category has topics, offer two choices: uncategorize the topics, or cancel
  • if category has no topics, then delete the category (same behaviour as today)

I can still delete a category after editing its description. That topic doesn’t (shouldn’t) count. How can I repro that?

(Jeff Atwood) #9

We need some kind of indicator of what is going on when you “can’t” delete a category, for sure.

(Perry Huang) #10

In the first scenario, I was unable to delete one of the renamed, empty, and default categories. Since then, I had created a thread and deleted the thread. I’m now given the option to delete the category.

In the second scenario, I was trying to delete the thread used for the description of the category. I didn’t realize that the thread was used for the description.

So there aren’t any more problems! Thanks all.


(Neil Lalonde) #11

Ah well, that’s good…

But for the future, I added a message that explains why a category can’t be deleted. For example:

I added a link to a topic in the category to help in cases where there’s a topic that isn’t being listed for some reason.

(PJH) #12

Reason given for my problem category was “Can’t delete this category because topic count is -1.”

Created a topic and was subsequently able to delete the category. My problem is sorted…

(Jeff Atwood) #13

Hmm @neil we should allow deletion if the value is 0 or lower. Not sure how it got that way, of course…

(Neil Lalonde) #14

I made that change today.

(Neil Lalonde) #15

This topic was automatically closed after 6 hours. New replies are no longer allowed.