Filter articles without any tags

  • [ ] I’m using stock [docker compose] setup, unmodified.
  • [X] I’m using docker compose setup, with modifications (modified .yml files, third party plugins/themes, etc.) - if so, describe your modifications in your post. Before reporting, see if your issue can be reproduced on the unmodified setup.
  • [ ] I’m not using docker on my primary instance, but my issue can be reproduced on the aforementioned docker setup and/or official demo.

I want to filter articles that have no tags by creating a filter using the match string “^$”, applied to article tags, in all feeds, applying any action (e.g., “set starred”). Although test in “Edit filter” dialog successfully identifies articles without tags as expected, that filter is never successfully executed on fresh articles.

Log into TT-RSS in safe mode, create filter as above, subscribe to several different feeds. Nb., I use unsupported TT-RSS docker image from Docker, but the problem is reproducible on demo instance (v23.03-cddbf5b) running here: Tiny Tiny RSS : Login.

  • Tiny Tiny RSS version (including git commit id): v23.03-903b9db, commit ee1f242365054aafa20e364e683bae091b8bfe35
  • Platform (i.e. Linux distro, Docker, PHP, PostgreSQL, etc) versions: Docker 20.10.3

I glanced through the Pref_Filters class, hoping to find a spot where a null return might throw off the SQL query, but I couldn’t see anything on first pass.

thanks for reporting, i’ll make a note to take a look.

fix: https://gitlab.tt-rss.org/tt-rss/tt-rss/-/commit/881f8805bd359cb92112c6c82615b580a5a5eb80

Thanks @fox for patching this! Unless I’m confused, however, it looks as if, after your patch is applied, ‘^$’ matches any array of tags, empty or otherwise. Maybe you meant line 1529 to be as follows: if (empty($tags)) array_push($tags, ''); // allow matching if there are no tags

you’re right!

https://gitlab.tt-rss.org/tt-rss/tt-rss/-/commit/1e90feef0e0cd7a2ad18ea9547ccedbe49a26991

how about this?

1 Like