Netlify CMS: 'Failed to persist entry: API_ERROR: Validation Failed'

We have a page within our site that is receiving the following error message when we try to save from within the CMS:

'Failed to persist entry: API_ERROR: Validation Failed'.

This only seems to be happening on one of the pages within our site.

Additionally, we are seeing this message when we first attempt edit the page:

Netlify CMS is adding labels to 1 of your Editorial Workflow entries. The "Workflow" tab will be unavailable during this migration. You may use other areas of the CMS during this time. Note that closing the CMS will pause the migration.

Possibly related?

1 Like

Hi @AdamChlan,

Does this help:

I am getting this on one of my posts in a project as well, but only seems to affect one post and can’t tell why. Sadly, the support guide you listed @hrishikesh does not address the Validation Failed error.

Do you have regex patterns in place to validate your widgets, by any chance?

Hi Tom, thanks for your prompt reply. I am using a regex in an eleventy shortcode to utilize the <picture> element like so:

module.exports = (url, alt, cls) => {
    return `<picture>
    <source srcset='${url.replace('/\/static\/img\//', '/static/img/1800/')}' media="(min-width: 1200px)">
    <source srcset='${url.replace('/\/static\/img\//', '/static/img/1200/')}' media="(min-width: 900px)">
    <source srcset='${url.replace('/\/static\/img\//', '/static/img/900/')}' media="(min-width: 600px)">
    <img src='${url.replace('/\/static\/img\//', '/static/img/600/')}' alt='${alt}' class='${cls}'/>

However, I am using this shortcode on all the other posts and they do not seem to have the same issue as the one throwing the error. Thank you again for any help you can give.

Hi there, @kylepfeeley :wave:

Sorry for the delay here. Are you still encountering this issue? If so, can you please share a link to your site as well as the shortcode on the other posts that are not having the same error? Thank you!

Hello, I’m encountering the same error noted above, and I also see the workflow message when I access the CMS. Is there a resolution?

Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help: - the site houses our extensive documentation that likely contains helpful information to get you back on track.

netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.

GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!

Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.

Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!

FWIW I removed these regular expressions but I still got the alert message listed above whenever I have posts waiting in the workflow queue, but when the posts are approved and deployed then I no longer get the message. Not sure if that is an alert that there are posts waiting, but if so it’s not a very clear alert, bad UX for CMS users, but doesn’t break functionality entirely.