Open rrelmy opened 5 years ago
Because of the case differences between MacOS and Linux (for example), we do our best to enforce lowercase slugs for maximum compatibility. You would have to explicitly override the slug behavior or create it by hand in the files with uppercase letters to run into this issue. I don't know how best to address it because of the ability to create them by hand, but you can see our attempt in action where we re-lowercase your Test
slug.
🤔
My main concern ist that this can be reproduced within the CP itself. Without touching files on the file system. We have customers breaking their page because they write into the slug field and the validation does not catch such cases.
Another case where this seems to cause problems is with sites that have uppercase characters in the slugs from older versions.
@jackmcdade please please please have a look into it … that's a very odd situation
@jackmcdade we experience the same issue, with a customer not knowing you shouldn't write uppercase letters into the slug. Would it be an issue to actively force the slug to be lowercase before saving/validation? By all means this could be added as a system setting, so existing sites won't break. It'll most likely also require the nginx configuration (or Apache) to match URLs in a case insensitive matter.
Describe the bug The check for unique slugs seems to be case sensitive but slugs are not really case sensitive.
To Reproduce Steps to reproduce the behavior:
test
Test
. ❗️ No error hereTest
slug. 🐛 Slug is lowercased in the formtest
item is overwritten with the content ofTest
Expected behavior Slugs should always be treated case insensitive or it should just work (might be problematic with macOS and Windows).
Environment details (please complete the following information):