FIX: Topics with muted tag didn't show up when filtering by category and tag (PR #8075)

It also removes the redundant filter parameter. Previously URLs looked like this:

http://example.com/tags/c/some-category/muted-tag/l/latest.json?filter=tags/c/some-category/muted-tag/l/latest

But it looks like the filter parameter was only used to find out if topics with a muted tag should be removed or not. But the same thing can be accomplished by using the first tag ID. The following URL looks a lot cleaner.

http://example.com/tags/c/some-category/muted-tag/l/latest.json

GitHub

You’ve signed the CLA, gschlager. Thank you! This pull request is ready for review.

I have no idea why this doesn’t work with the prefabricated category 🤷‍♂ https://github.com/discourse/discourse/blob/820cdc23a3fb472a50bbfd043cd28af5fe515618/spec/requests/tags_controller_spec.rb#L194

@nlalonde Do you remember why the filter parameter was used? I couldn’t find a good reason for this duplication.

http://example.com/tags/c/some-category/muted-tag/l/latest.json?filter=tags/c/some-category/muted-tag/l/latest

I have no idea. It doesn’t even look like a valid route…

1 Like

It’s a valid route, but the fact that the path and the filter query string are the same was really bothering me.