Netlify-cms: Error when saving changes on Netlify CMS - Failed to load entry

Created on 31 Mar 2020  路  12Comments  路  Source: netlify/netlify-cms

Describe the bug
When trying to save changes on a page using Netlify CMS, user gets this error:

Failed to load entry: TypeError: Cannot destruct property 'path' of 'o.filter(...).map(...)[0]' sa it is undefined.

To Reproduce

  • From Axway Open Documentation (https://axway-open-docs.netlify.com/docs/ ) navigate to any page and click Edit on Netlify CMS (top-right corner).
  • When on Netlify CMS make any change and click Save
  • CMS throws an error
  • Go back to Netlify CMS main page and click Workflow
  • The same error is shown again

Important Note

This has happened with 2 users already. When I asked then to go to GitHub and delete their fork/copy of axway-open-docs project, and go back to CMS, then they were able to Save the changes.

But this shouldn't happen, we can't ask users to delete their forks before using the Netlify CMS.

Expected behavior
When I click Save I should see Entry saved only, not an error.

Screenshots

CMS_error3

Applicable Versions:

  • Netlify CMS version: netlify-cms-app 2.12.0 index.js:27 netlify-cms 2.10.36
  • Git provider: [e.g. GitHub, BitBucket]
  • OS: Windows 10
  • Browser version: Chrome 80.0.3987.149 (Official Build) (64-bit)
  • Node.JS version:

CMS configuration
https://github.com/Axway/axway-open-docs/blob/master/static/admin/config.js

Additional context
Please prioritize this because it's a blocker for our work. When user see this error they don't know what to do and they can't progress with their work.

Thank you,
Andrea

bug

All 12 comments

Thanks for opening this @andreamussap, I'll try to reproduce and report back here.

Thank you @erezrokah for prompt response. Unfortunately the error doesn't occur with everybody. I couldn't reproduce it myself but I saw it happening with two users. One of them I was able to record.
The most important and weird thing to note is that after these users delete their forks on GitHub, then CMS went back to work. I'm looking forward to your feedback. Thanks.

Thanks @andreamussap, I've had previous success with reproducing such errors by creating a fork, then force pushing an old commit to simulate an out of date fork, so hopefully will manage to do it this time.

Unfortunately I wasn't able to reproduce even with an of sync fork:
https://github.com/erezrokah-test/axway-open-docs

I did submit a PR with additional logs https://github.com/netlify/netlify-cms/pull/3508 and a fix not to break the workflow view entirely when an error occurs.

I'm assuming the affected forks are gone by now right? Do you think you'd be able to clone/fork them before deleting so we can try and reproduce?

@erezrokah The two users/forks who showed me the issue are:

The user ygeorgiev found out that "this branch in his fork (https://github.com/ygeorgiev-axway/axway-open-docs/tree/cms/ygeorgiev-axway/axway-open-docs/20200330_apip_relnotes/fixed_issues ) was rebased to master, merged, but not deleted.

I've spoke with him today and he told me that he keeps getting the error. Does this help?

Yes, that helps a lot - will look into these forks

Update:
I was able to reproduce and create my own fork based on https://github.com/ygeorgiev-axway/axway-open-docs. See: https://github.com/erezrokah-test/axway-open-docs

Update:
Submitted a fix: https://github.com/netlify/netlify-cms/pull/3512

Quoting myself from the PR:

Underlying issue - open authoring branches were only deleted if they were merged using "squash and merge" and not deleted when using "create merge commit".

The fix was to call getBranchPullRequest directly instead of using retrieveMetadata since it uses the diff API which returned an empty diff for merge commits.

I see this is fixed now, thanks @erezrokah!

So this is maybe not much use at this point but maybe for testing purposes it could be useful.

This is another user fork where they were getting errors this morning. Deleting the fork and letting the CMS recreate it did not work and this user @jmbermingham is still having errors after doing that.
Here's a screenshot:
image
Here's a link to their fork https://github.com/jmbermingham/axway-open-docs

Thanks for reporting @alexearnshaw, we had another report for that in our slack and have a fix pending:
https://github.com/netlify/netlify-cms/pull/3514

This is now released under [email protected]

This is now released under [email protected]

Thanks a mil, @erezrokah for fast response and fix!!

Was this page helpful?
0 / 5 - 0 ratings