-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Question - Why is a - classified as an invalid slug character? #1459
Comments
It is valid, but not as the first character. |
Ah, I see the issue. It's enforcing a lowercase slug. Should the slug not be lowercase then this notice is raised. Should this be the case? Is the direction of the team to only accept lower case slugs? Further, does this imply that only lowercase ascii is supported? |
Not sure. I think the decision to use lower case slugs was made because of Linux filesystem is case-sensitive and it would cause too many issues if we allowed people to use mixed-case in Windows and then deploy their sites in Linux server. |
Generated slugs, sure I can understand that. But where a slug is set explicitly, I wouldn't expect this. |
@rhukster What do you think? |
Actually this just adds an entry in the log, and things still work. I aligned that to the admin-side slug regex, also adding support for Cyrillic charset |
But when you have 2.3k pages that fail this on this check, that creates a huge amount of logs and so is not just an entry in a log but a larger capacity and scale issue |
We can remove the logging statement, it really doesn't serve much purpose. |
done. |
See: https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Page/Page.php#L1500-L1502
I would have thought that a
-
would be a valid character to use in a slug.The text was updated successfully, but these errors were encountered: