Same tag different case on two pages causes an error
Describe the bug If you create two pages and put the same tag, but with different casing on each one, the second one will break and not be able to be created.
To Reproduce Steps to reproduce the behavior:
- Create a new page and add a tag
- Create another new page and add the same tag but use different capitalization
- When you click "Create" it will error and you will no longer be able to access the page
Expected behavior The page gets created with no errors.
I would expect case to be normalized if it will cause an issue to have two different casings
Screenshots N/A
Host Info (please complete the following information):
- OS: Windows Server 2012 R2
- Wiki.js version: 2.0.12
- Database engine: MS SQL Server 2016
Additional context N/A
This error is still present, and quite annoying to be fair. Any E.T.A on the fix?
Second that - it's causing us difficulty with getting adoption on our internal wiki as people are seeing errors when doing basic functions.
Also noticed that it's possible to save tags with leading and trailing whitespace. Would it be prudent to trim strings to prevent duplicates due to whitespace? Sure they're not true duplicates but at least visually they seem to be.
Yeah, tags are sort of problematic in wiki.js. From a usability perspective, tags should be normalized to lowercase to prevent the creation of multiple tags just because of a capitalization difference. My experience thus far is that eliminating the confusion of having tags like "linux" and "Linux" leading to different collections is a nearly universal good thing.
Fixed by 77548c8778bdd9e30379318d219fa892d5ffc112
Tags will now be normalized and trimmed.