"This value is already used by another project document"

Hello all.

I'm trying to create a page and I get the error when filling the slug field:
"This value is already used by another project document"

Except, it does NOT exist and there is no project with that slug in either the work or archive areas.

I need to use this slug! I can't name an about page /about-1 ...it needs to be /about

Is there any way to resolve this bug?

Thanks

Hello, @michaelpumo

Welcome to the Prismic community and thanks for reaching out to us.

This means that another document in your repository already has this UID value. If you can't find the document with this UID value, then that means that one of your documents used to have this UID value and now it is locked.

This article will explain why an old UID becomes locked, and how to unlock it.
Here is the article link: Error: This value is already used by another document | Prismic Help Center

Let me know if you have any other doubt.

Thanks,
Priyanka

Hi Priyanka

Unfortunately, that article's solution is to find the document with the same UID and duplicate it, then make a change.

But the document that used to have that UID was deleted from the repo and then also from the archive area. It is nowhere to be found and does not get returned, even in a query of the API.

It's as if the CMS is keeping a record of that UID and there is no way for me to remove that record; even though the page itself exists nowhere.

Any ideas on this? It feels like this should not be happening if a page is truly deleted. It should be freed up for later use.

Thanks

Hey, @michaelpumo

Can you please check the release, archived, draft section of your repository? It might be possible that you have a document with the old uid in these sections.

Thanks,

Priyanka

Hi, I have checked the Work, Planned and Archive sections and no document with that UID is present.

I don't see Draft or Release. I'm using the free plan, so perhaps these are features not accessible to me?

Thanks

Can you please send me the URL of your repository and the "UID" text you want to fill in, which custom-type? You can share this information with me in a private message if you wish.

Hello, @michaelpumo

I checked the API and I found that one document("a-month-of-type") is still using the old-uid. You need to follow the above article link to get rid of the old uid. You need to duplicate that document then delete the original one. You will be able to give "lego-animals" uid.

Let me know if you have any other doubt.

Thanks,

Priyanka

Thanks Priyanka!

May I ask for future reference what query you used in order to find this out? It might make my debugging easier going forward.

Thanks so much for the help.

1.You need to put this query [at(my.project.uid,"lego-animals")] in the query section of your API browser. You can visit your api browser through "https://mr-kaplin.prismic.io/api/v2".

Here is a documentation link: The Rest API Browser - Prismic

  1. Once you find the documentation with the "old-uid", go to your repository in Prismic. First duplicate the document which has the "old-uid", in your case you need to duplicate "a-month-of-type' document. After duplicating it you can delete the original one. It will delete permanently "old-uid" from the Prismic.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.