# Il monitoraggio dei tag non funziona per i non staff quando il tag fa parte di un gruppo di tag

**URL:** <https://meta.discourse.org/t/tag-watching-not-working-for-non-staff-when-tag-is-part-of-a-tag-group/213408>\
**Category:** Bug\
**Created:** [29 Dicembre 2021, 11:28pm UTC](https://meta.discourse.org/t/tag-watching-not-working-for-non-staff-when-tag-is-part-of-a-tag-group/213408 "2021-12-29T23:28:23Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [2 Febbraio 2022, 12:43am UTC](https://meta.discourse.org/t/tag-watching-not-working-for-non-staff-when-tag-is-part-of-a-tag-group/213408/9 "2022-02-02T00:43:17Z")

</div>

> [@tomitomas](#):
>
> Vedo che è stata rilasciata una nuova versione di Discourse [2.8.0] 4 giorni fa.  
> Hai applicato l’aggiornamento, questo problema è ancora presente con esso?

Questo problema dovrebbe essere risolto ora!

> <https://github.com/discourse/discourse/commit/12f041de5d5ff147e82ab3d16132f0f5ad06d389>
>
> \* FIX: Tag watching for everyone tag groups
> 
> Tags in tag groups that have perm…issions set to everyone were not able
> to be saved correctly. A user on their preferences page would mark the
> tags that they wanted to save, but the watched\_tags in the response
> would be empty. This did not apply to admins, just regular users. Even
> though the watched tags were being saved in the db, the user serializer
> response was filtering them out. When a user refreshed their preferences
> pages it would show zero watched tags.
> 
> This appears to be a regression introduced by:
> 
> 0f598ca51e7ada06f91a6a8717909627ee81a67c
> 
> The issue that needed to be fixed is that we don't track the "everyone"
> group (which has an id of 0) in the group\_users table. This is because
> everyone has access to it, so why fill a row for every single user, that
> would be a lot. The fix was to update the query to include tag groups
> that had permissions set to the "everyone" group (group\_id 0).
> 
> I also added another check to the existing spec for updating
> watched tags for tags that aren't in a tag group so that it checks the
> response body. I then added a new spec which updates watched tags for
> tags in a tag group which has permissions set to everyone.
> 
> \* Resolve failing tests
> 
> Improve SQL query syntax for including the "everyone" group with the id
> of 0.
> 
> This commit also fixes a few failing tests that were introduced. It
> turns out that the Fabrication of the Tag Group Permissions was faulty.
> What happens when creating the tag groups without any permissions is
> that it sets the permission to "everyone". If we then follow up with
> fabricating a tag group permission on the tag group instead of having a
> single permission it will have 2 (everyone + the group specified)! We
> don't want this. To fix it I removed the fabrication of tag group
> permissions and just set the permissions directly when creating the tag
> group.
> 
> \* Use response.parsed\_body instead of JSON.parse

> I tag nei gruppi di tag a cui sono state impostate le autorizzazioni su tutti non sono stati in grado di essere salvati correttamente. Un utente nella sua pagina delle preferenze contrassegnava i tag che desiderava salvare, ma i tag osservati nella risposta sarebbero stati vuoti. Questo non si applicava agli amministratori, solo agli utenti normali. Anche se i tag osservati venivano salvati nel database, la risposta del serializzatore utente li escludeva. Quando un utente aggiornava le sue pagine delle preferenze, mostrava zero tag osservati.

@nathank puoi verificare quando hai un attimo?

---

_[View the full topic](https://meta.discourse.org/t/tag-watching-not-working-for-non-staff-when-tag-is-part-of-a-tag-group/213408)._
