Last modified: 2014-01-08 21:43:56 UTC
A simple filter: length(added_links) > 0 works fine. But if I try to add throttling, it stops working at all. I tried with the options: Number of actions to allow: 2 Period of time: 3600 seconds Group throttle by: user Action: Block the user and/or IP from editing. Then I tried adding links several times to a single one and different articles by the same (registered) user, but the user has not been blocked. Also tried different actions, like Tag the edit for further review, and Trigger these actions after giving the user a warning. Nothing works, the warning is not been shown too. And the hit count on the filter stays at 0.
Thanks for taking the time to report this! Which versions of MediaWiki and which version of AbuseFilter is this about? Also see http://www.mediawiki.org/wiki/Manual:How_to_debug
> Which versions of MediaWiki and which version of AbuseFilter is this about? Sorry, forgot to add this: MW 1.21, AbuseFilter master. I will try to debug when I have some time.
I found out that the internal count of filter hits read from Memcached is always 0. I don't have Memcached enabled. isThrottled function (AbuseFilter.class.php) $key = 'wiki:abusefilter:throttle:2:user:3' (seems legit) $count = 0 (always). I think the problem is that AbuseFilter always uses Memcached for throttle, even if it's not enabled.
Change 92266 had a related patch set uploaded by Kaldari: Only allow throttling if object caching is enabled... https://gerrit.wikimedia.org/r/92266
*** Bug 55816 has been marked as a duplicate of this bug. ***
Change 92266 merged by jenkins-bot: Only allow throttling if object caching is enabled... https://gerrit.wikimedia.org/r/92266
Probably "throttle" should be taken out of the user interface if there is no memcached enabled? Also "blockautopromote" is using memcached only and I believe this is actually bug 20487
The "fix" for this appears to be a band-aid. The throttle should be made to work without object caching, rather than simply being hidden when it is not present.
(In reply to comment #8) > The "fix" for this appears to be a band-aid. The throttle should be made to > work without object caching, rather than simply being hidden when it is not > present. Probably some code using $wgMemc can just use wfGetCache( CACHE_ANYTHING );