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

When generated slugs include trailing numbers separated by a dash, an incorrect variation of the slug is chosen #5

Open
luma opened this issue Nov 17, 2010 · 0 comments

Comments

@luma
Copy link

luma commented Nov 17, 2010

We're generating slugs from our product skus, which can include letters, numbers, -, and /. Because our slug source can contain numbers and dashes you can end up with a situation where dm-is-slug incorrectly interprets a slug as already in use.

An Example:

Assuming the following slug already exist:

  • f8z469-043

Then if we attempt to create a new product with the SKU of F8Z469, we end up with a slug of f8z469-44, instead of the expected f8z469.

For us, I've been thinking the best approach might be to allow a config option that skips trying slug variations. Our slugs should always be unique, as the SKUs we generate them from should always be. If they aren't I'd rather just see a validation error that complains about the uniqueness of the slug.

Whether this will work for everyone, I'm not sure :-)

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