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

Should you be able to reuse an old slug from another record's slug history? #670

Closed
norman opened this issue May 28, 2015 · 2 comments
Closed
Labels

Comments

@norman
Copy link
Owner

norman commented May 28, 2015

See #663.

@norman norman changed the title You should not be able to reuse an old slug from another record's slug history Should you be able to reuse an old slug from another record's slug history? May 28, 2015
@marckohlbrugge
Copy link

marckohlbrugge commented Jul 24, 2017

Was surprised to find out Friendly ID's behavior in this regard.

Some context: I run a site where users can post projects. Each project has a URL like example.com/projects/foobar where foobar is a slug generated by Friendly ID. We use the history option so when projects are renamed (e.g. to turbo-donkey) the old links continue to work and redirect to the new page instead.

Here's the problem: If someone adds a different project with a slug that was previously used (e.g. foobar), then that project won't have a working URL. As /projects/foobar still redirects to turbo-donkey.

Even if the most recently created slug would take precedence, you'd still end up in a situation where old links to /projects/foobar, which used to redirect to point to one project, now start pointing to a different project.

The solution is, as the title of this issue suggests, to prevent reusing old slugs.

Any pointers on how to approach this?

@stale
Copy link

stale bot commented Dec 11, 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.

@stale stale bot added the stale label Dec 11, 2019
@stale stale bot closed this as completed Dec 18, 2019
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