Can't publish a document where uid is same as an archived/deleted document

Describe your question/issue in detail

When I try to edit/save a document with a UID it gives an error. I know there was a document with this UID before, but it is archived and/or deleted. I experienced the same issue in another repository last week. I could not save a document with a UID that is the same as an archived/deleted document there as well.

https://jam.dev/c/bfe964f0-901e-4e70-b66b-801309a4e3f0

Impacted feature

Saving document

What steps have you taken to resolve this issue already?

Tride to clear the archived documents by deleting them.
Tried to make a new document and save it instead of editing the existing one.

Errors

  • Oops! We were unable to save your document.
    We encountered an error while trying to save your document. Please contact our support team if this issue persists.

Your Role

Software Developer

Steps to reproduce

Create a document with a UID and save and publish.
Then archive and delete the document.
Create a new document with the same custom type and with the same UID and try to save.

Hi @ro.vdv,

I've had a look at your API, and the document in your Jam recording does indeed have the onderhoud UID. Were you able to save it after all, or is there something else happening?

Other than that, you're correct that this issue is often linked with a document's older UIDs preventing them getting re-used elsewhere. The way to fix it is usually to duplicate the document with that old UID and delete the original: archiving won't be enough, it needs to be fully deleted.

Let me know if there's anything I missed or didn't understand, or if you have another example :slight_smile: