# Error in browser console when using hashtag autocomplete in the composer: undefined generateIconHTML

**URL:** https://meta.discourse.org/t/error-in-browser-console-when-using-hashtag-autocomplete-in-the-composer-undefined-generateiconhtml/400570
**Category:** Bug
**Tags:** hashtag-autocomplete
**Created:** [April 13, 2026, 8:38pm UTC](https://meta.discourse.org/t/error-in-browser-console-when-using-hashtag-autocomplete-in-the-composer-undefined-generateiconhtml/400570 "2026-04-13T20:38:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [April 13, 2026, 8:38pm UTC](https://meta.discourse.org/t/error-in-browser-console-when-using-hashtag-autocomplete-in-the-composer-undefined-generateiconhtml/400570/1 "2026-04-13T20:38:53Z")

</div>

I haven’t noticed any issues yet, but I see error messages in the browser console when I use the hashtag autocomplete feature in the composer on my forum.

There are two slightly different versions:

In full [safe mode](https://meta.discourse.org/t/53504?silent=true) (no themes and no plugins), as soon as I use `#` in the composer, this error appears:  
`Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'generateIconHTML')`

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/6/6/b6601e57bbd7078944b675714790c3beb5057ea2.png)

If I use [safe mode](https://meta.discourse.org/t/53504?silent=true) only for themes, so plugins are active, the error above does not appear when I use the hashtag autocomplete. But after I select a category using `#`, it triggers this error instead:  
`[autocomplete] handleKeyup: TypeError: this.options.dataSource is not a function`

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/7/c/07c2a1d6c550b898979255a2b878e4b0c8682f35.png)

Does anyone have an idea what might be causing this?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 14, 2026, 8:13pm UTC](https://meta.discourse.org/t/error-in-browser-console-when-using-hashtag-autocomplete-in-the-composer-undefined-generateiconhtml/400570/3 "2026-04-14T20:13:36Z")

</div>

> [@Moin](#):
>
> In full [safe mode](https://meta.discourse.org/t/53504?silent=true) (no themes and no plugins), as soon as I use `#` in the composer, this error appears:  
> `Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'generateIconHTML')`

This one will be fixed by

[https://github.com/discourse/discourse/pull/39267](https://github.com/discourse/discourse/pull/39267)

> [@Moin](#):
>
> If I use [safe mode](https://meta.discourse.org/t/53504?silent=true) only for themes, so plugins are active, the error above does not appear when I use the hashtag autocomplete. But after I select a category using `#`, it triggers this error instead:  
> `[autocomplete] handleKeyup: TypeError: this.options.dataSource is not a function`

That one I’m having trouble reproducing 🤔

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [April 14, 2026, 9:15pm UTC](https://meta.discourse.org/t/error-in-browser-console-when-using-hashtag-autocomplete-in-the-composer-undefined-generateiconhtml/400570/4 "2026-04-14T21:15:56Z")

</div>

> [@zogstrip](#):
>
> That one I’m having trouble reproducing 🤔

It might be related to tag translations. I think I noticed this error after trying something with translated tags and found the other one when I tried to reproduce it in [safe mode](https://meta.discourse.org/t/53504?silent=true). But it could just as easily be a coincidence. I often find things I didn’t want to test.

Since it still happens after disabling themes, I am quite sure it’s not caused by my customizations. The business plan only allows standard plugins.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 25, 2026, 6:00am UTC](https://meta.discourse.org/t/error-in-browser-console-when-using-hashtag-autocomplete-in-the-composer-undefined-generateiconhtml/400570/6 "2026-04-25T06:00:41Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
