decap-cms: 🐛 API error when saving entry

cc: @jackDevAu @pierssinclairssw

Hi,

Describe the bug Some of our users are getting an error when they try to save an entry.

Failed to persist entry: API_ERROR: Not Found

image Figure: Error when saving

After some investigation, it looks like the error occurs when Netlify CMS tries to compare the cms changes branch on the users fork with the main branch on the base repository. e.g. https://api.github.com/repos/SSWConsulting/SSW.Rules.Content/compare/main...JackDevAU:cms/JackDevAU/SSW.Rules.Content/rule/appointments-do-you-show-all-the-necessary-information-in-the-subject/rule

the JackDevAU:cms/JackDevAU/SSW.Rules.Content/rule/appointments-do-you-show-all-the-necessary-information-in-the-subject/rule branch was not created. It is not clear why (see video). The results are the same when using an incoginto window in a different browser.

The problem is resolved after updating the users fork. To try reproduce the problem, we reverted a fork to an old commit, then made a change, but the entry still saved.

To Reproduce We cannot consistently reproduce this error as it is only happening to some of our users. See our video attached below demoing the problem.

Expected behavior The entry should save without error.

Applicable Versions:

  • Netlify CMS core version: 2.54.0
  • Netlify CMS app version: 2.15.59
  • Git provider: GitHub

CMS configuration https://github.com/SSWConsulting/SSW.Rules/blob/main/src/cms/config.js

Additional context https://github.com/SSWConsulting/SSW.Rules/issues/801

https://user-images.githubusercontent.com/38869720/148888815-fba3ec44-c978-45a0-8f3f-d3e99713ef13.mp4

Figure: Demo of the error

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 7
  • Comments: 24 (13 by maintainers)

Most upvoted comments

This issue is in our attention. We are waiting for the PR owner to solve merge conflicts. If he doesn’t respond we will do that on a new PR.

Ping… what is the status of this one? -a www.adamcogan.com

This was so painful. Please fix the problem… or improve that error message please 😢

  • That video explains the problem well.

  • The solution for me was: Github.com | My Profile | Your repositories | Select the forked repo eg. SSW.Rules.Content Click Fetch upstream Click Fetch and merge

     Note: This updates my fork to be usable. When I went back to my edit, I refresh and lost my changes. So I re-did 
    

-a www.adamcogan.com

@bradystroud I see that many of you are from SSW. Could you find some time together to contribute?

We are aware of this problem, we will take a look at the PR soon after we establish the first Decap release. Thanks for your patience 🙏

Here’s the PR, let me know if you guys need any changes: #6504

@erezrokah @bradystroud

😄

Hey @asheerrizvi Looks good - Go ahead and create a PR 🙂