# Cannot delete an empty category with identical slug name

**URL:** https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650
**Category:** Bug
**Created:** [11.Май.2015 19:10:58 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650 "2015-05-11T19:10:58Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [11.Май.2015 19:10:58 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/1 "2015-05-11T19:10:58Z")

</div>

Hello, I have searched a bit and come up with a few posts, but what I am experiencing does not quite match those users reports.

So I am attempting to delete a category that has no posts except an unlocked about post. After clicking yes on the modal asking if i am sure about the deletion, I get a screen that looks like this:

 ![](https://global.discourse-cdn.com/meta/original/3X/4/6/46089a777f09d30a2549d3dc663ae0cc924c656d.png) 

With the category screen looking like:

 ![](https://global.discourse-cdn.com/meta/original/3X/d/0/d0023daf679f2849b2fe1bc13bb49474ddbac739.png)

The only thing I can think of effecting this may be that 1 topic was created there which was later moved. I imagine it is this topic creating the issue. Any suggestions on how to accomplish the removal of this category?

I should also mention that I was able to delete the subcategory that filled this category without an issue, as well as a different category which had never seen a post.

I am using v1.3.0.beta7 +35 and there are no log messages regarding this.

Thanks for any help : )

---

<div class="post-metadata">

### Author: ![Qasem\_h](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qasem_h/32/155935_2.png) [@Qasem\_h](https://meta.discourse.org/u/Qasem_h)
#### Post date: [11.Май.2015 19:25:23 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/2 "2015-05-11T19:25:23Z")

</div>

You are logged with admin account ?

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [11.Май.2015 20:14:31 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/3 "2015-05-11T20:14:31Z")

</div>

Yes logged in with an admin account and able to perform all other admin privileges such as deleting and creating other categories.

---

<div class="post-metadata">

### Author: ![Qasem\_h](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qasem_h/32/155935_2.png) [@Qasem\_h](https://meta.discourse.org/u/Qasem_h)
#### Post date: [11.Май.2015 20:15:51 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/4 "2015-05-11T20:15:51Z")

</div>

check your category securty setting

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [11.Май.2015 20:17:54 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/5 "2015-05-11T20:17:54Z")

</div>

I tried flipping that to a couple values, both admin only as well as everyone. Changing the security setting had no effect on the ability to delete the post; under both everyone and admin view the delete action still results in the modal view, and the message ‘You are not permitted to view the requested resource’.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [11.Май.2015 20:39:27 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/6 "2015-05-11T20:39:27Z")

</div>

You cannot delete the “About the {Category Name} category” topics:  
[https://meta.discourse.org/t/cant-delete-about-the-category-topics/26638/2?u=deanmarktaylor](https://meta.discourse.org/t/cant-delete-about-the-category-topics/26638/2)

Deleting the category though - that’s another question.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [11.Май.2015 20:46:53 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/7 "2015-05-11T20:46:53Z")

</div>

Yeah I realize I can’t delete that topic. But it seems to be a bug that I cannot delete the category. I am pretty sure it has to do with the post that was made in that category and then later moved to another that prohibits the category from being removed. Im not sure what kind of checking the platform does when it attempts to delete a category though.

---

<div class="post-metadata">

### Author: ![Qasem\_h](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qasem_h/32/155935_2.png) [@Qasem\_h](https://meta.discourse.org/u/Qasem_h)
#### Post date: [11.Май.2015 20:48:51 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/8 "2015-05-11T20:48:51Z")

</div>

delete this post :

> Arduboy Buttons: How do they work?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [11.Май.2015 21:12:55 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/9 "2015-05-11T21:12:55Z")

</div>

The “you are not permitted” means that the server is replying with a 403 for some reason. What does the network inspector show?

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [11.Май.2015 22:05:02 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/10 "2015-05-11T22:05:02Z")

</div>

@Qasem_h, Good thought I could see how that might be a solution, it would be nice to not have to recreate the post though, but that is an option.

@riking:

**Request headers**

```
Host: community.arduboy.com
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-CSRF-Token: z+2Exf2bEus32p8TN6HCrmWXyHllYZO3GX/20E/rVIU=
X-Requested-With: XMLHttpRequest
Referer: http://community.arduboy.com/c/development
Cookie: _t=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxXX; _forum_session=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx%3D--6f4733a5aedf5f863823e662be83bd85297e6877; destination_url=http%3A%2F%2Fcommunity.arduboy.com%2Fdirectory_items%3Fperiod%3Dweekly%26order%3Dlikes_received%26_%3D1431377306013; __profilin=p%3Dt
Connection: keep-alive

```

**Response headers**

```
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Mon, 11 May 2015 22:01:39 GMT
Server: nginx
Set-Cookie: _forum_session=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxXXXXXXXXXXXXXXXXXXXXXXXXx%3D--d57d08c3217046c999685e78032e72bbb7162f51; path=/; HttpOnly
__profilin=p%3Dt; path=/
__profilin=p%3Dt; path=/
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
X-Request-Id: e01a8c8a-3f68-4432-8824-8d1845a31c78
X-Runtime: 0.012455
X-XSS-Protection: 1; mode=block
status: 403 Forbidden
x-content-type-options: nosniff

```

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [11.Май.2015 22:09:33 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/11 "2015-05-11T22:09:33Z")

</div>

Thanks Riking, I wasn’t sure about that.

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [12.Май.2015 02:06:43 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/12 "2015-05-12T02:06:43Z")

</div>

Welp, I will just go ahead and make the category non-visible to members. That will be close enough.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [21.Май.2015 06:26:57 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/13 "2015-05-21T06:26:57Z")

</div>

Is there any other category/sub-category present which has same slug “development”?

---

<div class="post-metadata">

### Author: ![meke](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@meke](https://meta.discourse.org/u/meke)
#### Post date: [25.Май.2015 03:18:40 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/14 "2015-05-25T03:18:40Z")

</div>

Ineed there is a sub category with the same name.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [25.Май.2015 08:31:09 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/15 "2015-05-25T08:31:09Z")

</div>

Okay, then this issue is fixed via:

[https://github.com/discourse/discourse/commit/836c7b4251617872727d3b4a77cb5b73715c344d](https://github.com/discourse/discourse/commit/836c7b4251617872727d3b4a77cb5b73715c344d)

Update to the latest version and try deleting the category again.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [25.Май.2015 20:42:09 UTC](https://meta.discourse.org/t/cannot-delete-an-empty-category-with-identical-slug-name/28650/16 "2015-05-25T20:42:09Z")

</div>


