<p>My problem was that the uri needs to be unique. I found the duplicate uri by finding my entry in craft_elements_i18n, and looking for other entries with the uri I wanted.</p>

CC BY-SA 3.0
2014-06-30T01:59:12.423Z
Yes Marion, that's exactly what I wanted you to do. Sorry for my poor description.
carlcs
CC BY-SA 3.0
2014-06-30T05:36:27.597Z
slug was unique, but I had a single using that uri. But you pointed me in the right direction.
Marion Newlevant
CC BY-SA 3.0
2014-06-30T12:39:21.297Z
Entry slug, entry uri, to me it's all the same ;)
carlcs
CC BY-SA 3.0
2014-06-29T23:42:39.877Z
2014-06-29T23:42:39.877Z
Marion Newlevant
<p>There probably is still an (maybe corrupted) entry in the db with that slug. Have a look at the entries-content table, sort it by slug and you possibly see an entry responsible for your problem.</p>

CC BY-SA 3.0
2014-06-29T23:26:31.077Z
craft_elements_i18n table? No slug archive there. If I try to change the slug in the db (in that table) to 'archive', I get this error from mysql: Duplicate entry 'news/archive-en_us' for key 'craft_elements_i18n_uri_locale_unq_idx' so somewhere in the db it remembers that slug
Marion Newlevant
CC BY-SA 3.0
2014-06-29T23:39:20.587Z
figured it out. The uri needs to be unique.
Marion Newlevant
CC BY-SA 3.0
2014-06-29T23:05:38.230Z
2014-06-29T23:05:38.230Z
carlcs
<p>I have an entry whose slug I would like to set to 'archive', but when I save it, it is 'archive-1'. There is no existing entry with slug of 'archive' (<code>craft.entries.slug('archive')</code> returns null). There have been previous entries with that slug.</p>

CC BY-SA 3.0
2014-06-29T23:28:36.530Z
Have you tried clearing the caches?
Simon Kuran
CC BY-SA 3.0
2014-06-29T23:34:50.230Z
Have tried clearing the caches. Doesn't help, but thanks!
Marion Newlevant
<entries>
Unable to set slug to value used previously
# Unable to set slug to value used previously

(Asked by: username_0 on 2014-06-29)

I have an entry whose slug I would like to set to 'archive', but when I save it, it is 'archive-1'. There is no existing entry with slug of 'archive' (`craft.entries.slug('archive')` returns null). There have been previous entries with that slug.

**Tags:** entries
> **Comments:**
> **username_1**: Have you tried clearing the caches?  
> **username_0**: Have tried clearing the caches. Doesn't help, but thanks!  

---

## 2 answers

### Answer by username_0 on 2014-06-29. Score: 1 | Accepted answer

My problem was that the uri needs to be unique. I found the duplicate uri by finding my entry in craft\_elements\_i18n, and looking for other entries with the uri I wanted.

> **Comments:**
> **username_2**: Yes Marion, that's exactly what I wanted you to do. Sorry for my poor description.  
> **username_0**: slug was unique, but I had a single using that uri. But you pointed me in the right direction.  
> **username_2**: Entry slug, entry uri, to me it's all the same ;)  

---

### Answer by username_2 on 2014-06-29. Score: 2

There probably is still an (maybe corrupted) entry in the db with that slug. Have a look at the entries-content table, sort it by slug and you possibly see an entry responsible for your problem.

> **Comments:**
> **username_0**: craft_elements_i18n table? No slug archive there. If I try to change the slug in the db (in that table) to 'archive', I get this error from mysql: Duplicate entry 'news/archive-en_us' for key 'craft_elements_i18n_uri_locale_unq_idx' so somewhere in the db it remembers that slug  
> **username_0**: figured it out. The uri needs to be unique.  

---

