-
-
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
use lowercase comparison for taxonomy terms #1733
Conversation
Since the URI params only get returned lowercase in 1.3.8, the comparison for the use of the terms of the taxonomy should search in a lowercase version of the pages taxonomy maps. This will result in a loss of the case sensitivity of taxonomy terms. Term1 and term1 will be the same. fixes: getgrav#1729
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think rather than doing the lowercasing here at 'runtime' so to speak, it should be done in the header()
method when the taxonomy items are actually parsed from the header and stored in the local taxonomy array (line 409-411)
Since Taxonomy terms are not part of i18n, this would remove the possibility to have uppercase letters in terms. Is my understanding of this correct? For using Tags, this may be acceptible, for custom taxonomies this may be not correct in general. In my case, it makes a huge difference for the german translation. In en locale, that's okay. "hot chocolate". But in german the category is "Trinkschokolade" and "trinkschokolade" would just look very unprofessional. Such things may occur for other people using Grav as well. Plus it will possibly change data for existing installations unexpected and without further notice. |
Examples of using categories and tags with uppercase letters are there: |
Actually!!!!! I tested a tag of I was thinking that the URL as being lowercased because of this: https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Uri.php#L294-L297 Turns out that was a user contribution, but no If however you set this to I'm going to look at changing this functionality so:
|
Actually i've reverted the pull completely. I realized that when enabled that broke quite a few things. |
|
In fact this also breaks the latest changes to the taxonomylist-plugin. Setting this to false then doesn't need to set the |
Yah i've actually removed that case_insensitive_url option completely.. its no longer even used.. will be in next release (setting to false will get you by for now). Also i've re-released Taxonomy plugin with that lowercase filter removed. So pretty soon, things should be back to normal! |
That's great to hear and thanks for your patience and understanding. |
Since the URI params only get returned lowercase in 1.3.8, the comparison for the use of the terms of the taxonomy should search in a lowercase version of the pages taxonomy maps.
This will result in a loss of the case sensitivity of taxonomy terms.
Term1 and term1 will be the same.
fixes: #1729