I can't delete an empty category


(J La Rochebrochard) #1

Hi,

i have an empty category with just the description topic and i can’t delete it… :frowning: bug?

Thanks for your help.


(Renis) #2

Try to unlock the “about” thread!


(J La Rochebrochard) #3

does not work :frowning:


(Kane York) #4

Maybe there’s a deleted post? It could be possible that the logic’s messed up so that deleted topic prevent you from deleting a category, but you can’t see them.


(Jeff Atwood) #5

@neil can you add some kind of counter on this page so people can see, if they can’t delete a category, why not? Sort of like we do with users and deletion.


(Lars Doucet) #6

I have this exact same bug:


(Dia) #7

I’m running into this bug as well. The category has no topics, except for the description topic. What’s interesting is that topic_count for the category I’m trying to delete is -17. Not sure if that’s related.

edit: debugging the code further, it seems like it’s related. I noticed that running the Jobs::CategoryStats job does not update stats for categories with no topics (sounds like a bug to me). I added a temporary post, ran the job (topic_count became 1 now), and then deleted the temporary post. I’m now able to delete the category.

So, perhaps, the fix is to basically have the Jobs::CategoryStats job include empty categories in the update.


(Jeff Atwood) #8

We now show the last remaining topic as a reason when you can’t delete a category.


(Jeff Atwood) #9