Tags become unusable if used once and then topic is deleted

AI-generated summary

A bug has been reported where tags become unusable site-wide if a topic with those tags is deleted before anyone else uses them. jamesmarkcook was able to recreate the issue and confirmed it applies to any topic and tag for any user. The only current solution is to destroy the tags using the Rails console, although jamesmarkcook reported encountering errors when doing so. neil acknowledged the issue as a bug and will investigate. sam asked if the issue still persists, considering the area has undergone significant refactoring over the years.

I have successfully set up Tag Groups on my Discourse but in doing so ran into some weird issues which I mentioned here.

At the time I couldn’t figure out what was going on, but since playing with Tags and investigating I can successfully recreate the issue.

If you create a topic, add tags but then delete that topic before anyone else has used any of the tags, those tags become unusable site wide.

I can confirm this applies to any topic and any tag for any user.

This isn’t so much a problem if you lock down tag creation and create a topic in the Staff section to list your usable tags on, but it’s obviously a bug that will need fixing. The only solution I’ve found is to destroy those Tags using the Rails console. They then become selectable again.

1 me gusta

Actually, I’m seeing errors when destroying those Tags :fearful:

Could these be linked?

Sounds like a bug. I’ll look at it.

The redis errors don’t seem related to this topic though.

3 Me gusta

¿Sigue siendo este un problema hoy en día? Hemos refactorizado esta área bastante a lo largo de los años.

Este tema se cerró automáticamente después de 5 días. Ya no se permiten nuevas respuestas.