Contentful logo

Contentful Community

Disabling draft posts from entering production pushes

We seem to have a continual ongoing problem with our content editors not filling out all of the required fields in a draft post (and honestly it is a draft so why does it need to be completely filled?). These unfilled fields cause our production pushes to break with errors. This causes us to have to fined the publisher and ask them to complete the required fields.

We would like to exclude these draft posts from production pushes…can this be done? If not how can we force the required fields in draft mode?

Hi @jennifer.garcia , the behaviour sounds correct, since the validation happens at the Publish action. However I do understand that it might happens that some content is then published (or referenced) not correctly.

There are some ways this could be avoided, however it would require some work on your side:

  1. Create a UI extension that could verify in the right sidebar the values that are still missing:
    https://www.contentful.com/blog/2017/10/09/creating-ui-extensions-with-contentful/
    UI Extensions | Contentful

  2. Create a script (or even a simple website), using the Preview API Content Preview API | Contentful - This API behaves like CDA API but also don’t break when Draft content is displayed or linked.

  3. Use the CMA API: Content Management API | Contentful through a script to verify that the content is correct before performing a push to production. But this will need to be a custom script built by your Engineering team.