Deleted field in custom type still shows up in API response

Hello Prismic team!

My site is built in metalsmith and relies on an old node module (metalsmith-prismic) that hasn't been maintained in a while. (we are working to migrate to react/nextjs)

My prismic repo is here: https://dronedeploy-www.prismic.io/

I added a new boolean field into my Solution content type: https://dronedeploy-www.prismic.io/masks/solution.json/. It turns out that this field type is not supported by metalsmith-prismic and causes everything to break and prevents the site from building. I have deleted this field in the custom types editor but i'm still seeing it in the API response. How do I permanently delete this from the API?

Here's the build error I'm seeing:

This is currently blocking all my work and is an urgent issue.

Thanks!

I found this thread Update API after deleting custom types which talks about deleting custom types but not individual fields in custom types. So wondering if this will not show up in the API after a bit of time?

Also found this What happens if I remove or rename the API ID of a Prismic field? | Prismic Help Center but this does not mention how to remove something from an API response.

Thanks!

Hi Niki,

When you delete a field in a Custom Type the related document fields will continue to appear in the API this has been implemented like by design.

if you want to remove those fields then you need to go to the individual docs unpublish and publish them.

Please let me know if you need further assistance,
Fares

Hi @Fares Thanks. I figured this out shortly after posting. Might be helpful to others if you updated your support documentation page What happens if I remove or rename the API ID of a Prismic field? | Prismic Help Center to reflect this information. This caused quite a bit of stress for me yesterday. Overall your documentation needs to be improved. (This is top of mind for me as I inherited a project with NO documentation so I've been writing it for the past few months haha)

Thanks!

1 Like

Thanks for you feedback and I've created an issue to improve this article in our @Prismic-Support-Team backlog with this suggested modification

Screenshot 2021-01-08 at 12.00.34

Is there anything you can suggest us to improve to this article?

@Fares That update looks great! Thanks.

1 Like