Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Have you tried clearing the caches? – Simon Kuran Jun 29 '14 at 23:28
Have tried clearing the caches. Doesn't help, but thanks! – Marion Newlevant Jun 29 '14 at 23:34

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.

share|improve this answer
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 Jun 29 '14 at 23:26
figured it out. The uri needs to be unique. – Marion Newlevant Jun 29 '14 at 23:39
up vote 1 down vote accepted

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.

share|improve this answer
Yes Marion, that's exactly what I wanted you to do. Sorry for my poor description. – carlcs Jun 30 '14 at 1:59
slug was unique, but I had a single using that uri. But you pointed me in the right direction. – Marion Newlevant Jun 30 '14 at 5:36
Entry slug, entry uri, to me it's all the same ;) – carlcs Jun 30 '14 at 12:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.