Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevents overwriting with duplicate slug names #1381

Closed

Conversation

brianlmacdonald
Copy link
Contributor

- Summary

Fixes #1377 & #1164, piggy backing on PR #1239.

getEntry in github's implementation was returning a 404, and the error wasn't being resolved correctly in checkOverwrite in backend.js.

- Test plan

I created a github back end and tested. It worked.

- Description for the changelog

Prevents duplicate slugs from overwriting files.

- A picture of a cute animal (not mandatory but encouraged)

@verythorough
Copy link
Contributor

Deploy preview for cms-demo ready!

Built with commit a3b883d

https://deploy-preview-1381--cms-demo.netlify.com

@verythorough
Copy link
Contributor

Deploy preview for netlify-cms-www ready!

Built with commit a3b883d

https://deploy-preview-1381--netlify-cms-www.netlify.com

return Promise.resolve(false);
}
return Promise.reject(error);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: the catch method being added is the only new change in this PR compared to the original PR.

@erquhart
Copy link
Contributor

We'll need a maintainer to sponsor this one, closing as stale for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.8.1 - Cannot publish new documents
4 participants