The used UID in the archives is really a problem for us.
For instance, if I have a document that had ABC123 in the UID at one time then it changed to something else, then that UID is never available again. If I want to use ABC123 for a new document, I cannot do that if another document once had the ABC123 UID.
From the documentation "After you've duplicated it, you can delete the original and this will allow you to use "old-uid" again."
Also from the docs: "We save all the previous UID values of a given document so that your old links won’t be broken on your site when you change a UID value."
I get that, but it would be nice to have an option in case people make mistakes and burn up a UID that we need in the future.
Hello Joe thanks for reaching out to us!
Yes, it is understandable that encountering this conflict when naming your documents can be confusing. In the end, as you mentioned, it is a security measure so that the links work, so at the moment we don’t have plans to modify the behavior of this field. But we appreciate your feedback. If we make any changes the future we will let all our users know!
Couldn’t you edit the UID to something you will not use on the archived document?
No, Prismic remembers ALL old UIDs. The only way at present to remove these old UIDs is to clone your document, then delete the original that contains the wanted UID, then rename the cloned document.
This is the only way I found how to completely remove a used UID.
Not exactly sure how this relates to security, but I can see that it would relate to data integrity. The only problem is when you have 10 different content contributors, and someone makes a mistake on the UID name which creates problems for future documents.
For the moment this is the solution to this: What to do when a UID value is already in use by another document
I know this isn’t ideal and I agree it can be frustrating so I’m tagging the @features-team to make them aware of this. Hopefully, we can discuss improving UID management in the future as a better solution to this.
If/when we make any changes in this process we’ll give an update here.
Thank you, much appreciated!
Right, however that solution relies on having access to the old document with the previous UID, which I do not, as explained in my previous post. Is there a way to access documents deleted from the archive or are they permanently? My question could be put another way as, how do I utilize this solution if I no longer have access to that original document?
If a document is deleted from the archive then the UID should be available. This would suggest that the document is not fully deleted.
If you provide me with the URL of your repo and the UID that you are trying to free up in a private message then I can try and find what document is causing this error for you.
I moved this conversation back to this main thread.
Thanks for sending me the extra information
So I checked out your repository and this document still exists in your ‘Planned’ section, any documents in the ‘Planned’ or ‘Archived’ sections will cause this issue. You can either delete this document to free up the UID or re-use the document from there.
This is being tracked as an open feature request.
If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the button to show your support for the feature and check out our Feature Request Guidelines.