Closed matthojo closed 9 years ago
I tried to reproduce this issue with the current master, and I can't reproduce it. Could you please specify the Ghost version you're using?
This bug was reported with MySQL - did you try to reproduce with MySQL?
@ErisDS Confirmed. I reproduced it using MySQL.
This is probably an issue with case sensitivity: SQLite3 is case sensitive by default while for MySQL it depends on the collation (but usually it's case insensitive).
mysql> select slug from tags where name = 'example';
+-----------+
| slug |
+-----------+
| example |
| example-2 |
+-----------+
vs.
sqlite> select slug from tags where name = "example";
example
@halfdan You're totally right, thank you for the explanation.
@ErisDS @halfdan by setting the collation to utf8_bin
with t.collate('utf8_bin');
on the https://github.com/TryGhost/Ghost/blob/master/core/server/data/migration/000.js#L99 it works as intented the only problem is that t.collate only works with mysql so the adapter will have to be validated.
Is this something we need to include inside the migration, or we let the users know so that they can properly set it in their MySQL installation?
I think this should be handled by bookshelf.js/knex.js - maybe @tgriesser can have a look at this. From my Rails/ActiveRecord experience I know that AR has an option to allow case-sensitive or case-insensitive matches which automatically adjusts the queries for each database.
See: http://edgeguides.rubyonrails.org/active_record_validations.html#uniqueness
@tgriesser Is there any way in bookshelf to execute case insensitive queries?
Going to close as this is way out of date. The tag management page should be a workaround for any issues like this, and if there are still issues surrounding this behavior they should be re-raised and documented.
I'm still having trouble with this. When I type in either cased tag, both show up after I save.
I'll do a screencast if needed. I don't mind if it will help.
I have /tags/tldr/ & /tags/tldr-2/. On my post it shows both tag: https://www.dropbox.com/s/x39xsi9lnk6jt0t/Screenshot%202015-01-12%2002.08.54.png?dl=0
@chancesmith That's because they are, essentially, both the same tag. In the next version of Ghost there will be a new interface where you can edit your tags to fix this problem.
From the forum: https://ghost.org/forum/bugs-suggestions/2411-editing-the-character-case-of-tags/
How to reproduce this bug