Page 3 of 3

Re: Help with filters

Posted: 09 Sep 2015, 10:15
by fox
unfortunately i'm not capable of remote viewing and telepathy so no although i'm reasonably certain it involves user error, much like all questions about purging not working. i have corrected your (wrong) guess about filter rules, that's all.

in the nutshell filters involve matching article data using a builtin php function with a user-supplied regular expression. you can't really go wrong here unless the user fucks up somehow.

also, if you would search before posting, you'd know that filter preview is not 100% accurate and never will be, how to debug filters and updating correctly, how to provide necessary data before posting, it's all here on the forums. what you're doing wrong is basically your posting so far.

Re: Help with filters

Posted: 09 Sep 2015, 20:22
by SimbaLion
Well I think you're wrong, frankly. I created a filter today using long strings, about 30-40 characters or less. When I had 16 rules the filter would fail tests, and when I reduced it to 10 rules the filter passed. There was no punctuation, only alphanumerics and spaces.

Then I took the 6 strings I removed and created a new filter with those, and that also passed the test, so this looks like an issue of length.

I have searched the forum, I searched it when I first ran into this problem a long time ago. I'm familiar with the limitations of the test function. Does ttrss log errors somewhere? Perhaps it would be helpful if instead of "an error has occured" it would provide details about the error.

Re: Help with filters

Posted: 09 Sep 2015, 20:57
by fox
w/e is shown in filter test means nothing in practice, stuff that actually gets applied you can see in the feed debugger

like i said it's all on the forums

e: it's pretty obvious that if you keep adding rules indefinitely you will run into POST query limits as set by your http server (so you won't be able to save or test the filter). this has nothing to do with tt-rss however, if you manage to increase the limits it will keep on trucking.

Re: Help with filters

Posted: 09 Sep 2015, 21:00
by JustAMacUser
Would you be willing to post a screenshot of the complete filter that's failing with an error?

Also, check and post your PHP error log's relevant entry after the error occurs.

fox is not wrong about the number of rules. The code just does a foreach loop for each rule so quantity is kind of irrelevant. It is more likely there's a small error in the regex syntax.

Re: Help with filters

Posted: 09 Sep 2015, 21:03
by fox
yeah the lack of concrete info in this thread borders on pathological, no logs, no nothing, just words

Re: Help with filters

Posted: 09 Sep 2015, 22:10
by fox
heads up, filter test dialog is hopefully less useless now

Re: Help with filters

Posted: 10 Sep 2015, 00:51
by SimbaLion
So I tried using the feed debugger but got this:

[21:48:20/30840] start
[21:48:20/30840] local cache will not be used for this feed
[21:48:20/30840] fetching []...
[21:48:20/30840] If-Modified-Since: Wed, 09 Sep 2015 16:41:00 GMT
[21:48:35/30840] fetch done.
[21:48:35/30840] unable to fetch: 28 Operation timed out after 15000 milliseconds with 3783 out of 5712 bytes received []

Here is the text of spam posts I'm trying to filter out:

Currently in need of a Wordpress designer with the relevant experience in html, css coding as well as javascript. Must be familiar with coding existing sites or building sites from the ground up. Experience with bootstrap is a big plus. Also experience with designing front end is needed for this position. Please have an existing portfolio as we would need to take a look at some of your previous work to determine if you are the right fit for us. Client references would be very helpful in helping us to decide if you are the right fit. This position pays between $2500-$3000 per month. Bonus included after 3 month probation period. Get in

And the filter rule is:

There are others, but they're all basically the same kind of posts and the same sort of problem. What I'd really like to do is group them together with a search like (freelancegigs|somescammer|somefraud|somespammer|etcetcetc)

I appreciate you taking time to try and help with this.

Re: Help with filters

Posted: 10 Sep 2015, 02:10
by Latimer
It's a stupidly obvious thing to point out, but, unless you're doing a full post fetch somewhere, I doubt you ever see in your reader the part of the post that contains the word you're trying to use in your filter.

Re: Help with filters

Posted: 10 Sep 2015, 09:41
by fox
>So I tried using the feed debugger but got this:

it's hard to overstate the amount of effort thats going on here

got a timeout welp time to post some more random stuff on the forum

maybe try the debugger again? nah

Re: Help with filters

Posted: 27 Feb 2016, 23:49
by rcaputo
JustAMacUser wrote:Just in case there's confusion, while your browser will translate HTML entities into their respective characters, preg_* has no understanding of such. So if the source is using the character code, or named entity, or actual character; they will all be different for preg_match and you'll have to build your pattern to account for all of the variations.

This answer helped me today.