Exclude_tag does not work in category RSS feeds

exclude_tag does not work in category RSS feeds (and specifically for those).

To reproduce:

wget -O a.xml “https://meta.discourse.org/c/support/6.rss”
wget -O b.xml “https://meta.discourse.org/c/support/6.rss?exclude_tag=ai”
diff a.xml b.xml

You will see the two files are the same.

Expected:

ai tagged are excluded from the RSS feed.

Additional information:

Main RSS feed do work, that is:

wget -O a-all.xml “https://meta.discourse.org/latest.rss”
wget -O b-all.xml “https://meta.discourse.org/latest.rss?exclude_tag=ai”
diff a-all.xml b-all.xml

shows the two files are different.

I have an easy workaround!

/latest.rss?category=6&exclude_tag=ai

confirmed the edge case with the category rss feeds.

Something like this should fix it though properly. Will tag team.

def category_feed
  guardian.ensure_can_see!(@category)
  discourse_expires_in 1.minute
  # ...
  @topic_list = TopicQuery.new(current_user, build_topic_list_options)
                           .list_new_in_category(@category)
  render "list", formats: [:rss]
end
1 Like

I can confirm the easy workaround:
a) was easy;
b) actually worked.

Many thanks!

1 Like

@f-a thanks for the report :+1: It’ll be fixed by

2 Likes

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