Content disappearing after editing content type

Just had a mini panic when my slice content disappeared after making modifications to the content type JSON, and not just from the build but the Prismic UI too. Fortunately, Prismic support and Phil were on hand to help figure it out.

After adding the original JSON back it the documents returned in the Prismic UI and everyone was happy again.

Always remember to back up that custom type JSON.

1 Like

Also for anyone who runs into the same issue and hasn’t made manual back up files of your custom types JSON structure, you can check v1 of your api to see if the old api ids and content are there: https://your-repo-name.prismic.io/api/v1

Hopefully if it’s still there in V1 you can recover the content by re-adding exactly the slice ids and the content api id’s in the custom type. If not I’m afraid the content is lost.

@Phil how can I see the check v1 of your api to see if the old api ids and content are there... ?
I can access the API explorer, but am unsure how I would find old versions of json structures?

Hi Thomas,

This is only a recommendation for recovering from an accidental custom type change immediately after the fact. You will be able to see the document structure from the API response, if it has not been overwritten, and rebuild the custom type based on the API ID’s of the documents being returned.

If you have overwritten the documents by publishing new versions then you cannot see the old API ID’s to rebuild from.

This is not a way of checking historic versions of a custom type. Is that what you’re searching for?

Thanks @Phil - I understand now.

I have a client who claim their content has suddenly disappeared for a particular type (“FAQ”).
They have 10 or so which are blank, with 2 that are not blank. All were modified around 5 months ago according to the writing room UI.

I am trying to figure out if there has been a custom type change which may have broken something.

Yes, if there have been new ones published after the change, then content is lost unfortunately. Sorry to hear about that.

We recommend keeping a copy of the custom types JSON in your local project, but I don’t think that would help in this case if the API response was updated.

1 Like