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

Administration allows saving empty Slug #6

Open
JakeGinnivan opened this issue Oct 29, 2012 · 5 comments
Open

Administration allows saving empty Slug #6

JakeGinnivan opened this issue Oct 29, 2012 · 5 comments
Labels

Comments

@JakeGinnivan
Copy link
Member

As a result, an empty name is saved to the Entries tables and when going to the Page List an exception occurs.

@peterheard01
Copy link
Contributor

has this been solved yet? Can I have a look into it?

@JakeGinnivan
Copy link
Member Author

Feel free to submit a PR with the fix :)

@peterheard01
Copy link
Contributor

Hi Jake, I have had a look actually the problem seems to have moved on. When the user creates an entry if they dont provide a slug it now auto populates from the title. However this means that there can be multiple entries with the same slug and when they save one that meets this criteria they get a YSOD because the query EntryByNameQuery does a .single and this now has two with the same name. I have added a little bit of validation in so that both the Model.Title and Model.Name (the title ad slug) will be checked to see if they already exist in an entry (by checking the name). If they do then I add a model error.

Anyway ive done the code on a branch and merged into a master my end. Im not sure how I create a Pull Request the github instructions say I should be able to click pull request but there isnt one for me. Do I need to be added as a collaborator or something?

@JakeGinnivan
Copy link
Member Author

This is a good guide to contributing to open source projects on github http://code52.org/contributing.html

@JakeGinnivan
Copy link
Member Author

Also,

If you revert the merge commit to master, then you will be in the right spot. Basically you should only ever update master from upstream, the merge into master is done via the pull request

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

No branches or pull requests

2 participants