A few weeks ago I implemented the new Tag features including the Tag Listing and Tag templates. I styled everything up nicely and wrote a blog post and moved on.
Today I was rooting around looking for something and noticed the Tag page for “CSS” showed only “2” on the Tag Listing page for the count, but has 15 entries on the Tag page for “CSS”. I thought it strange that there was only two, seeing as I feel that all I do is talk about CSS, so I think fifteen is the correct number. I checked a few other tags on the Tag Listing page and they all appear to be correct in line with their respective pages.
I’m scratching my head wondering how this can be a thing? Any ideas?
Tag Listing page: Apple Annie’s Weblog · Tags
Tag page for CSS: Apple Annie’s Weblog · Posts tagged with css
So, this was a real head-scratcher for me as well. Chased my tail for a bit, and then I finally realized what’s happening: tags are case-sensitive, and you have 13 entries tagged with
css and two tagged with
CSS. The world finally makes sense again!
However, this raises a really interesting question about whether case-sensitivity on tags is ideal or not. On the one hand, I think it’s nice that everyone can define their own tags in their own way, and there aren’t any system-imposed design decisions that interfere with that. On the other hand, that flexibility makes it all too easy to fall into the very same unexpected trap that you did above. And then on a (third?) hand, there’s fairly well-established precedent for tags to be lowercase strings.
Any thoughts on this, one way or another?
That is so bizarre! I just checked some posts this morning thinking that very same thing (case sensitive) and didn’t see any with caps, but I guess it’s possible I only checked the two that are lowercase
Anyway, annoying, and I’m not sure on a response to your last question yet. At least I know how to fix it for now though. Let me come back to this when my brain can engage more.
Thanks for digging into it!
Okay, now it gets weirder. I’ve checked all the posts via the omg.lol UI and they all show lowercase.
How were you able to see them uppercase? Aren’t all posts stored as flat files? (ie there is no database, or is there? maybe categories are saved in a flat db?) I wonder if it matters how they were first saved, though. It is possible some of them had been capitalized and then I made them all lowercase to be consistent. Hmm.
I can try editing and re-saving anyway if you think that might make a difference.
Back to the question about case sensitivity, I suppose from a human side it shouldn’t matter and if it gets entered as all caps it should still be stored lowercase, especially for something like an acronym. So in the end they would all get converted to lowercase regardless of how they’re entered. As for special characters and spaces, I am glad at least the tags on omg.lol have allowed me to use periods, they get stripped out on micro.blog but spaces are allowed.
I found them, and I also found that I did the same thing with html/HTML.
Sheesh! Happy Friday, have a great weekend Adam!
Whichever way we go, it should be consistent in all situations. At present, if you have some posts tagged with
css and others with
/tags page will display two different tags BUT when you click in to them, both
/tag/CSS show the same list containing any post tagged with either
CSS. I feel like you
can’t shouldn’t have it both ways.