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

Error creating collection entry depending on title value #1121

Closed
ianmilliken opened this issue Feb 20, 2018 · 9 comments
Closed

Error creating collection entry depending on title value #1121

ianmilliken opened this issue Feb 20, 2018 · 9 comments
Assignees

Comments

@ianmilliken
Copy link

ianmilliken commented Feb 20, 2018

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
On production, I'm creating an entry in an already populated collection called 'Services'. Depending solely on the title of the entry, NetlifyCMS fails to create it and returns an error.

- If the current behaviour is a bug, please provide the steps to reproduce.

  1. I create a new entry with a specific title of 'Advertising', 'Advert', or 'Advertise' (the title generates the URL)
  2. I click to save
  3. CMS returns a popup error of 'Error: Failed to load entry. Failed to fetch' and then fails to save the entry, refreshing to a blank screen (except for the CMS navbar)
  4. The browser console shows the same error

- What is the expected behavior?
The entry should be created, and would be if the name were anything else it seems

- Please mention your CMS, node.js, and operating system version.

  • Netlify CMS version 1.2.0
  • Node version v6.13.0
  • Running on Netlify

- Please link or paste your config.yml below if applicable.

- label: Services
    name: services
    folder: site/content/services
    create: true
    fields:
      - { label: Title, name: title, widget: string }
      - { label: Intro, name: intro, widget: text, required: false }
      - { label: Icon, name: icon, widget: image, required: false }
      - { label: Icon Reverse Color Scheme, name: icon_reverse, widget: image, required: false }
      - { label: Image, name: image, widget: image, required: false }
      - { label: Content, name: body, widget: markdown, required: false }

I know this is ultra specific, so I'm not expecting any definitive answers, but if anybody has an idea about what might be causing this or has experienced something similar then it'd be great to hear from you.

@tech4him1
Copy link
Contributor

Would it be possible to link your repo, so that we can try to reproduce?

@ianmilliken
Copy link
Author

Yeah of course, the repo is at https://github.com/ianmilliken/mpc. It's worth me mentioning that the problem doesn't occur on when running on localhost

@tech4him1
Copy link
Contributor

It's worth me mentioning that the problem doesn't occur on when running on localhost

Are you using git-gateway when running on localhost, or a different backend? Git Gateway can work on localhost.

@ianmilliken
Copy link
Author

ianmilliken commented Feb 21, 2018

I'm using the github backend for localhost and git-gateway for production

@tech4him1
Copy link
Contributor

That might explain why it's only working locally :). Can you try using git-gateway on localhost, and see if it fails there as well?

@ianmilliken
Copy link
Author

Yep I've tried git-gateway on localhost, it doesn't repeat in producing the error!

@erquhart
Copy link
Contributor

Forked and was able to repro. Digging in.

P.S. fantastic work on this site @ianmilliken, bravo.

@ianmilliken
Copy link
Author

Cheers @erquhart, thanks for looking into it.

@erquhart
Copy link
Contributor

erquhart commented Feb 27, 2018

Just now getting around to actually looking into this - it's because you're using http instead of https, which shouldn't be possible. It's covered under #1141, going to close this in favor of that. It seems Netlify Identity invite links are sending folks to the insecure url.

Until there's a fix, just manually ensure that you're connecting via https.

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

No branches or pull requests

3 participants