# Matching wrong tag to tag icon

**URL:** https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395
**Category:** Bug
**Tags:** tag-icons
**Created:** [May 18, 2021, 6:38pm UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395 "2021-05-18T18:38:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![e3hines](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/e3hines/32/214165_2.png) [@e3hines](https://meta.discourse.org/u/e3hines)
#### Post date: [April 7, 2021, 8:43pm UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/1 "2021-04-07T20:43:23Z")

</div>

First, just wanted to say thanks for this awesome component. It’s really helped categorize and easily distinguish between tags and ultimately, categories. Our community has given amazing feedback around this component, so thank you!

I seem to be having two separate issues that I’m hoping can be resolved:

1. Icons are entered correctly, but never show up (similar to @MrDavis97 – but also different as they never showed up in the first place)
2. Some tags show where the icon should be, but nothing shows up

**Example 1:**  
I’ve entered in two different tags, both using the same Font-Awesome icon (exclamation-circle). However, one tag it works, and in the other tag, it does not work.

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/c/2c2cbcfb0fd013d86f4474752e383aabc4122961.png)

I’ve tried using a different FA icon, deleting and re-adding, but nothing seems to work.

This has happened on other tags too (open-zwave-1-4, open-zwave-1-6, zwave-js-2-mqtt, zwave-2-mqtt, etc): [Inovelli Community](https://community.inovelli.com/tags)

**Example 2**  
This one is really weird and possibly it’s a problem with FA. One of our tags (google-home) we wanted to use the FA icon, “Google”. As you can see from the diagram below (sorry for all the arrows) – the red shows how it was implemented, then the purple shows that the tag does not show up (there looks to be a placeholder – almost like that FA icon doesn’t work). The other weird thing is that it seems to show up properly when I inspected the page. I’ve confirmed this is a free icon, so it should work. The only thing I can think of is maybe there’s a lock on trademarked logos? Not sure.

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/d/edf913f2c938e0071a8f734ab3f37a0601df408f.png)

As you can also see – if I swap out the Google icon with a different one, it works. So, again, may just be a FA problem, but I wanted to call it out to see if anyone else experienced the same thing.

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/a/da569feddd0baa8c7aad47495e1e7210232a548f.png)

Anyway, at the very least, I’d love some help with the first example if possible.

Thanks again for such a cool component!

---

<div class="post-metadata">

### Author: ![AquaL1te](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aqual1te/32/201966_2.png) [@AquaL1te](https://meta.discourse.org/u/AquaL1te)
#### Post date: [May 17, 2021, 2:46pm UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/2 "2021-05-17T14:46:23Z")

</div>

I have this exact same issue again. But now with the tag “discourse” and “jitsi”. I cannot add any icon to them. In fact any newly created tag cannot be assigned an icon. Existing tags can be modified without issues. Is there some way I can generate a log about this?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [May 17, 2021, 2:52pm UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/3 "2021-05-17T14:52:36Z")

</div>

I’m not sure, but maybe there’s an issue after a certain number of tags in the setting. Can you tell me how many tags you are adding icons to, roughly?

---

<div class="post-metadata">

### Author: ![AquaL1te](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aqual1te/32/201966_2.png) [@AquaL1te](https://meta.discourse.org/u/AquaL1te)
#### Post date: [May 17, 2021, 4:04pm UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/4 "2021-05-17T16:04:45Z")

</div>

I have 33 tags now, all of them are listed [here](https://forum.tzm.community/tags).

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [May 17, 2021, 9:10pm UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/5 "2021-05-17T21:10:20Z")

</div>

Hi @AquaL1te and @e3hines,  
I made an update to the component that fixes the bug you both ran into.

The issue was that the component code was previously matching the wrong tag for a specific icon. In AquaL1te’s site this is quite obvious:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/5/15788ec82076bef5a8950a31a21cc0bc980aa03c.png)

When the component was looking for an icon for `jitsi` it was wrongly matching `it` to get the icon (and then in a second step only, it was checking the full tag name, and since there was no match, it was showing nothing).

If you update the component, you should see the issue fixed.

> [@e3hines](#):
>
> This one is really weird and possibly it’s a problem with FA. One of our tags (google-home) we wanted to use the FA icon, “Google”.

Because Font Awesome has multiple sets of icons, the brand icons need a prefix. Try using `fab-google`, that should work. (And sorry it took me so long to respond to this…)

---

<div class="post-metadata">

### Author: ![AquaL1te](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aqual1te/32/201966_2.png) [@AquaL1te](https://meta.discourse.org/u/AquaL1te)
#### Post date: [May 18, 2021, 4:40am UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/6 "2021-05-18T04:40:35Z")

</div>

That indeed fixes it! Thanks!

---

<div class="post-metadata">

### Author: ![e3hines](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/e3hines/32/214165_2.png) [@e3hines](https://meta.discourse.org/u/e3hines)
#### Post date: [May 18, 2021, 6:38pm UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/7 "2021-05-18T18:38:13Z")

</div>

Awesome, that fixed it for me too – thank you so much!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [July 21, 2023, 10:59am UTC](https://meta.discourse.org/t/matching-wrong-tag-to-tag-icon/272395/8 "2023-07-21T10:59:31Z")

</div>


