question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot save changes (API_ERROR: Reference update failed - "UNPUBLISHED_ENTRY_PERSIST_FAILURE")

See original GitHub issue

Describe the bug

I am getting an error when I try to save some changes in the CMS of a site deployed on Netlify. The error I get when I make a change and click the Save button is this: Failed to persist entry: API_ERROR: Reference update failed

To use GitHub as the authentication method for the CMS (so that my GitHub user can login into the CMS), I followed the instructions of the docs. The configuration can be seen here: https://github.com/Petrolog-IT/one-click-hugo-cms/blob/master/site/static/admin/config.yml

backend:
  name: github
  repo: Petrolog-IT/one-click-hugo-cms
  branch: master

As the docs mentioned, I created an OAuth app on GitHub and added the Client ID and Secret in the appropriate settings page of Netlify:

image

I can login into the CMS of the site deployed on Netlify with the Petrolog-IT GitHub user successfully. I can also delete things from the CMS successfully. But I cannot save any changes.

To Reproduce

Expected behavior

Create a commit with the changes.

Screenshots

image

Applicable Versions:

  • Netlify CMS version: 2.9.7
  • Git provider: GitHub
  • OS: Ubuntu Xenial 16.04
  • Browser version Version 75.0.3770.142
  • Node.JS version:

CMS configuration

https://github.com/Petrolog-IT/one-click-hugo-cms/blob/master/site/static/admin/config.yml

Additional context

These related issues didn’t help:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
tomrutgerscommented, Dec 23, 2019

I added this to the list of API_ERROR solutions and workarounds: https://github.com/netlify/netlify-cms/issues/2827

2reactions
erezrokahcommented, Dec 23, 2019

This is solved by deleting the cms branch from the repo. I remember it from a previous issue. I’ll check why having a branch with that name breaks editorial workflow

Read more comments on GitHub >

github_iconTop Results From Across the Web

API_ERROR Reference update failed - Netlify Support Forums
and when they try to publish or save a post, they get Failed to persist entry: API_ERROR: Reference update failed.
Read more >
"Cannot save back changes because objects in the working ...
Cannot save back changes because objects in the working set reference objects outside of the working set. The Refedit session is still active....
Read more >
Cannot save changes workflow - Atlassian Community
Unable to save changes when trying to edit the workflow. I am an administrator.
Read more >
Can not save changes - WordPress.org
Here is what I get prompted with after hitting “Save changes”. “Saving failed: AJAX call successful, internal saving process failed.
Read more >
Twitter profile update failed? Here's why - Twitter Help Center
Are the changes you've made to your Twitter account settings not saving? Read this article for common reasons why.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found