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

Long post titles can lead to invalid hostnames in Netlify deploy previews #526

Open
fool opened this issue Aug 15, 2017 · 6 comments
Open

Comments

@fool
Copy link

fool commented Aug 15, 2017

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

bug

- What is the current behavior?

CMS entries for posts with long titles can create branch names too long for deploy previews via Netlify's standard branch deploy naming scheme. DNS hostnames can be a maximum of 64 characters per "segment" so "a-very-long-blog-post-title-because-i-am-a-really-really-wordy-dude--sitename.netlify.com" will not be a usable hostname and thus the URL will fail to load with various/unspecified bad behavior.

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

create a post with a title longer than 64 characters and attempt to load the branch deploy from the deploys tab in Netlify's UI

- What is the expected behavior?

Branch deploys would be loadable by their normal hostname, branchname--sitename.netlify.com . Since there is no way for the CMS to know what "sitename" is there we should probably pick a short-ish cut-off like 40 characters - it won't solve EVERY situation but it will do better than the current which allows you to create an impossible branchname of >64 characters which will NEVER load properly (even for a sitename like 'a.netlify.com').

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

Netlify default build (node v6.11.2 (npm v3.10.10)/ubuntu 14.04 x86_64) && CMS version 0.4.4

@fool fool added the kind: bug label Aug 15, 2017
@erquhart
Copy link
Contributor

Good point. Since we don't want to enforce Netlify-specific rules, is to allow a configurable max-length, and maybe set the default to something around 40.

@erquhart erquhart added this to the 1.0.0 milestone Sep 8, 2017
@Benaiah Benaiah self-assigned this Nov 15, 2017
@tech4him1
Copy link
Contributor

tech4him1 commented Nov 28, 2017

I really don't think we should do anything to the title here -- that's part of the content. I think the real thing that we should be looking at is keeping slugs and branch names shorter, not the title. Thoughts?

Although, many CMS's do limit title length, so it's not strictly a bad idea.

@fool
Copy link
Author

fool commented Nov 28, 2017 via email

@mittalyashu
Copy link
Contributor

@erquhart How it is related to design? I didn't get it.

@erquhart
Copy link
Contributor

Design also encompasses architectural design.

@stale
Copy link

stale bot commented Oct 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

Successfully merging a pull request may close this issue.

5 participants