funnelweblog / FunnelWeb

FunnelWeb is an open source blog engine targeted at developers
http://funnelweblog.com/
Other
96 stars 55 forks source link

Administration allows saving empty Slug #6

Open JakeGinnivan opened 12 years ago

JakeGinnivan commented 12 years ago

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

peterheard01 commented 11 years ago

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

JakeGinnivan commented 11 years ago

Feel free to submit a PR with the fix :)

peterheard01 commented 11 years ago

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 commented 11 years ago

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

JakeGinnivan commented 11 years ago

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