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

Empty track slugs cause URL problems #119

Closed
jack126guy opened this issue May 18, 2017 · 2 comments
Closed

Empty track slugs cause URL problems #119

jack126guy opened this issue May 18, 2017 · 2 comments

Comments

@jack126guy
Copy link
Contributor

jack126guy commented May 18, 2017

If a track's slug turns out to be empty, its URL will be https://pony.fm/tracks/#####-, which is not recognized by the track route.

I raised this issue on MLP Forums a few months ago. While I appreciate the (presumed) manual intervention, I think it should be fixed properly.

There are two solutions I can think of:

First, the easy solution: Use a default slug if the slug that Laravel generates is empty. (It could be just a single "-"; hopefully that doesn't cause other problems.)

Second, the harder but perhaps more aesthetically pleasing solution: Allow URLs of the form https://pony.fm/tracks/##### (note the lack of hyphen) and use that as the "canonical" URL for tracks with empty slugs.

jack126guy added a commit to jack126guy/Pony.fm that referenced this issue May 19, 2017
@jack126guy
Copy link
Contributor Author

Examining the routes, I think the harder solution is probably going to be more trouble than it's worth, so I'd just go for the easy solution. I have a fix on my fork in the easy-slug-fix branch.

jack126guy added a commit to jack126guy/Pony.fm that referenced this issue May 19, 2017
@ghost ghost self-assigned this May 19, 2017
@ghost
Copy link

ghost commented May 19, 2017

Looks good. Can you submit a PR so we can merge this?

This issue was closed.
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

1 participant