"Suppress these tags from summary emails" settings is not working in preview digest email?

AI-generated summary

The “Suppress these tags from summary emails” setting is not working as expected in the preview digest email. th21 reported that excluded tags are still included in the preview, and simon discovered that the issue is due to the setting expecting a pipe-delineated list of tag ids, not tag names. The setting was changed to use tag names instead of ids, unlike the digest_suppress_categories setting, which works correctly with category ids. The issue has been fixed as reported by Osama, thanks to the report by @th21 and analysis by @simon.

I excluded some tags in the new settings and try to preview the digest email, the preview contains some duplicated topics, and topics with those tags are also included.

2 Likes

Testing this on my local dev site, it seems to be a bug. The code is expecting the digest_suppress_tags setting to be a pipe delineated list of tag ids, but it’s actually a list of tag names:

Here’s what the setting looks like on my site:

SiteSetting.digest_suppress_tags
=> "foo|bar"

The code that’s excluding the tags from the digest is expecting the setting’s value to be "1|2" (the tag ids.)

Note that the digest_suppress_categories setting works without any issue. The settings category-selector saves category ids, not category names.

3 Likes

This is now fixed in:

https://github.com/discourse/discourse/commit/83621ccbe797223b48b624b00ef04f24672e1f03

Thank you for the report @th21 and for the great analysis/debugging @simon!

4 Likes