svc
(Tony Milne)
May 16, 2022, 7:41pm
1
Hello!
I have a website that has a page that has had multiple UIDs that have since been deleted but are still stored as the documents slugs. Is there anyways to remove them?
example
{
"uid": "about-us",
"slugs": [
"about-us",
"careers",
"careers2"
],
}
(need to remove Careers slugs from About-us)
Thank you!
Priyanka
(Priyanka Maheshwari)
May 17, 2022, 7:28am
3
Hello @svc
Thanks for reaching out to us.
Please find information about slugs in this article:
Slugs are a deprecated feature of Prismic
Slugs are a deprecated feature used before we introduced the UID field . We don't recommend using them and thus don't provide any resources for it.
You can still find them in your document object for anyone with a legacy setup that uses them.
You don't need to worry about them!
Thanks,
Priyanka
svc
(Tony Milne)
May 17, 2022, 2:40pm
4
Hi @Priyanka ,
since slugs are a depreciated feature, how do we remove them? it seems they might be connected with the URLs object being returned in this API:
https://foxen.prismic.io/toolbar/predict?url=%2Fcareers&tracker=cpbb2pvb
I don't see a way to remove them on the prismic dashboard, and it is causing routing errors on our site.
Thanks!
Priyanka
(Priyanka Maheshwari)
May 17, 2022, 6:51pm
5
@svc Unfortunately, you can not remove slugs. What routing error are you getting? could you please share more details?
svc
(Tony Milne)
May 17, 2022, 7:23pm
6
@Priyanka
When I try to change my "career" page to "careers" it says the UID is already in use, but the only time Careers was used was in the early stages of "about-us" development.
now when I go to "myWebsite.com/careers " I am routed to the about-us page.
let me know if you need clarification!
Priyanka
(Priyanka Maheshwari)
May 19, 2022, 11:14am
7
@svc
It's not related to slug. It's related to the UID field in Prismic editor. This means that another document in your repository already has this UID
value. It could be a document that is drafted or in the archive.
Please check our article to unlock the old UId:
When adding a value to your UID field, you may encounter the following error:
This value is already used by another <custom-type-name> document
This means another document in your repository already has this UID value. It could be a document that is drafted or in the archive. If you can't find the document with this UID value, one of your documents used to have this UID value, and now it is locked. To re-assign a UID, you must delete the document that currently has that UID.
This article will…
Let me know if the issue doesn't solve.
Thanks,
Priyanka