Make slug(UID) non-editable after publishing the document

Hello, Prismic community!

Is there a way to disable the editing feature on fields(slug or UID in this case) after the document is published?

We are experiencing the issue that UIDs get updated on published documents without putting the correct redirect in place. And this results in the creation of the same page with different UID. It would be great to have an option to make the UID field non-editable(or disabled) after the document is published.

Looks like there was a request for the same or similar feature a while back: Can I disable or hide a field that content editors should no longer use?

Has this feature been added by any chance? Or any plans to add?

1 Like

Hi Hosh'ki,

This is not something that exists within Prismic and is not something that we are likely to implement. Although I've marked it as a feature request for the team to see.

The issue with disabling UID editing after publishing is that users will no longer be able to update this important field in the case of errors or changes, so it would be counterproductive.

A better solution might be a more robust publishing workflow with our user roles. This way Publishers can make sure Writers haven't edited this field.

I would like to understand your website application a bit better though to know why changing a UID causes multiple builds of the same page. What technology is you app built in?

We have also discussed showing old UIDs in an object in the API to build redirects easier for static websites and also gave an automatic workaround for re-redirecting from changed UIDs here:

Thanks.

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 :heart: button to show your support for the feature and check out our Feature Request Guidelines.