Can't create new tags?

AI-generated summary

iamntz reported a recent bug preventing the creation of new tags across all interfaces (composing, editing topics, and editing titles), despite having admin privileges and no visible error logs. While investigating, they also asked if wildcards could be used on staff tags. codinghorror requested reproduction details, and sam began investigating after making recent changes to tag preferences. sam initially proposed a fix via a GitHub commit, but iamntz identified a specific Uncaught TypeError: this.get is not a function error, suggesting a scoping issue. sam apologized for the rushed first attempt and provided a corrected commit. The issue was successfully resolved, as confirmed by iamntz.

Hey guys. I just realized that I can’t create a new tag.

It doesn’t work in any way:

  • when composing new topic
  • when editing topic
  • when editing topic title & category.

I don’t think it’s a permission thing, since I tried to create them while I was logged in as admin.

There is no error log, in either /logs or console, just nothing happens when I press Enter in the tag popup:

I’m not sure when exactly the problem arised, but it’s pretty recent, because i have a new tag created just couple of days ago.

I’m up to date with everything:


Totally unrelated question: can I use wildcards on staff tags? I.e. admin-*?

Thanks!

Can we repro this @techapj ? Any errors in your logs?

Let me have a quick look, I had to change some stuff there for tag prefs

I think this should fix it:

https://github.com/discourse/discourse/commit/c5c443fda3d7001e2d0947506b06de307fb0af24

5 « J'aime »
Uncaught TypeError: this.get is not a function

on this line:

if (!term.length || !this.get('allowCreate')) return;

I think it might be a problem of scoping?

Apologies for the sloppiness, trying to rush a fix here and no proper access to my dev env

Try this:

https://github.com/discourse/discourse/commit/64ca5552bceef54fca7da51da0c2f933ef1ac148

9 « J'aime »

Indeed it works! Thanks a lot!

3 « J'aime »