About this board

Workshop on AbuseFilter extension

7
SSethi (WMF) (talkcontribs)

Hello Daimona, Greetings! I am reaching out to ask for your help with a technical workshop on the AbuseFilter extension.

A few months ago, through a workshop series as part of the Small wiki toolkits initiative, we learned that one of the Indic community's challenges is a lack of knowledge of tools to fight vandalism on wikis. Indic community involves 25+ smaller language wikis. We are considering organizing a workshop in December for the community. The focus would be on counter-vandalism tools, specifically on AbuseFilter extension and how to use it.

As you currently seem to be one of the active maintainers on this extension and may also know best how to use it, I wonder if you would be interested in running a hands-on workshop around this topic? If not, who else would you recommend I should reach out to? I would much appreciate your thoughts. Thanks!

Daimona Eaytoy (talkcontribs)

Hi Srishti! Yes, I might be interested in this proposal. However, before I can give a final answer, I'd like to know a little bit more about the workshop. Specifically: 1) Is there a planned date on which this is going to happen? I want to make sure it doesn't collide with my personal agenda. 2) How long is the workshop going to be? This is just so I can get an idea on the topics that will be covered. And, 3) is there a list of (proposed) topics, or a place where people may ask for specific topics to be covered? Thank you!

SSethi (WMF) (talkcontribs)

Thanks Daimona for your willingness!

> 1) Is there a planned date on which this is going to happen? I want to make sure it doesn't collide with my personal agenda.

We are considering organizing this workshop sometime in the first weekend of December, on the 5th or 6th. But, we can be flexible if you want to propose a date and time that works best for you.

> 2) How long is the workshop going to be? This is just so I can get an idea on the topics that will be covered.

I imagine this topic would require 1-2 hours. Ideally, we envision this workshop to be hands-on; the goal is for participants to learn the necessary skills needed to combat vandalism and apply on their wikis immediately after the workshop. Also, some or all participants who will attend might not have a technical background, which also needs to be kept in mind while designing it. Having said that, feel free to design it as you feel right.

> 3) is there a list of (proposed) topics, or a place where people may ask for specific topics to be covered?

There isn't a list of proposed topics, only that in a recent conversation with Indic community members, they shared a need to learn about the tools to fight vandalism on their wikis. And, after talking with a few folks, we learned that AbuseFilter is the recommended option. So, we would like to keep this focus, but feel free to include the topics that would be relevant. If you have a specific ask from participants, we would be willing to share that with them when we promote this workshop.  I don't know much about this topic, but I can imagine that we can ask participants, for example, to bring instances of vandalism that they face on their wikis or share them with us in advance, so you can help write filters to address those during the workshop. Is this possible?

Daimona Eaytoy (talkcontribs)

> We are considering organizing this workshop sometime in the first weekend of December, on the 5th or 6th. But, we can be flexible [...]

Great, thank you. I think that should be a relatively quiet period of the year, so it's likely OK.

> I imagine this topic would require 1-2 hours.

Hm, pretty long then. Perhaps we might have 2 parts, even on different days; say, 1h theory, 1h practice.

> Ideally, we envision this workshop to be hands-on; the goal is for participants to learn the necessary skills needed to combat vandalism and apply on their wikis immediately after the workshop.

This makes sense. We're still going to need some theory about how it works (generally speaking), but I'll keep in mind to focus on practice.

> Also, some or all participants who will attend might not have a technical background, which also needs to be kept in mind while designing it.

This is not a problem, especially if we agree on that beforehand. I can reserve some time for a brief introduction, e.g. to regular expressions.

> If you have a specific ask from participants, we would be willing to share that with them when we promote this workshop.

Not really, no, except for the level of technical background to assume. Specifically, the only real background we're going to need is about regular expressions, so my only question would be: "should we have a quick overview of what regular expressions can do?"; note, however, that this is not a simple topic, as it would require a full talk to be explained properly, so I'd expect participants to try and read something in advance, then answer their questions about that.

> we can ask participants, for example, to bring instances of vandalism that they face on their wikis or share them with us in advance, so you can help write filters to address those during the workshop. Is this possible?

Totally! In fact, that would be a great source of examples.

SSethi (WMF) (talkcontribs)

Thank you! We can organize the workshop in 2 parts then. We can do both on the same weekend, one on each day. Or, we can do one the following weekend. Whatever your preference would be. Time-wise, would 6 pm CEST work for you?

To your question about regular expressions, I think yes! It would make sense to assume that participants knowledge might be limited on this topic.

Daimona Eaytoy (talkcontribs)

> We can do both on the same weekend, one on each day. Or, we can do one the following weekend. Whatever your preference would be.

I think both on the same weekend is fine, although it really depends on the precise date

> To your question about regular expressions, I think yes! It would make sense to assume that participants knowledge might be limited on this topic.

Makes sense. I'm probably not the best person for a full talk about regular expressions, but I can try preparing an introductory talk for the limited features that people might need when writing filters.

SSethi (WMF) (talkcontribs)

I have added the details on the date & time here. As of now the workshop is scheduled for 2:30 pm your time (which would be 6 pm for participants joining from India). I realized the time I proposed earlier will be too late for participants. Hope it still works for you!

Rest all sounds good to me. If participants share information ahead of the workshop, I will pass that on to you. If not, then we can sync-up here a week or so before the workshop.

Reply to "Workshop on AbuseFilter extension"

A little advice for translatable pages

2
MGChecker (talkcontribs)

The translation extension actually uses blank lines to separate translation units. As smaller translation units are usually better (especially splitting headings from content and paragraphs from content from each other), it would be nice if you used a little more whitespace adding new information to translatable pages.

Daimona Eaytoy (talkcontribs)

Hey, thanks for the advice. I confess I'm a complete ignorant for what concerns the Translate extension (which is why I didn't ask for transladmin rights). I'll try to pay attention to whitespace for my future edits. Thanks again!

Reply to "A little advice for translatable pages"

False positive about one filter

4
94rain (talkcontribs)

Special:AbuseLog/171380 The creator of the page attempted to blank the page they created in error but get blocked.

Can I add & !(page_first_contributor == user_name) to the rule to allow page creators blank pages? Also, I expect to add & !(lcase(new_wikitext) rlike "{{[ _]*(speedy|delete)" to allow blanking with only deletion templates left (With reference to m:Special:AbuseFilter/117).

Can you please give some suggestions? Thanks!

Daimona Eaytoy (talkcontribs)

Hi, the false positive happened before a global filter had warned the user at their first attempt. I'd advice against using that variable because it's really slow. Anyway, I've tweaked the filter to avoid triggering if the user was just warned, and implemented the {{speedy}} part. However, I strongly recommend avoiding to talk publicly about private filters. Feel free to send me an email next time.

94rain (talkcontribs)

Noted with thanks. I will avoid talking about private filters in public. Best regards.

Daimona Eaytoy (talkcontribs)

Thank you for reporting it :-)

Reply to "False positive about one filter"
Framawiki (talkcontribs)

Hi!

Thanks for your huge work on AF!

I'm surprised by this strange filter catch fr:Spécial:Filtre_antiabus/examine/log/2533647. The filter itself contains only one rule, user_blocked. But I can't find any reference to such block in block log. Perhaps I've missed something?

Thanks!

Daimona Eaytoy (talkcontribs)

Hello @Framawiki! I checked the link, but user_blocked is false for it. Could you please link the affected filter? Thanks!

Framawiki (talkcontribs)
Daimona Eaytoy (talkcontribs)

@Framawiki Huh, that looks very bad... I strongly suspect it has something to do with the recent refactors of the Block class. I've merged this patch 15 minutes ago, let's see if that helps somehow. Please do write me again if you notice this bug again with the new version of MediaWiki. Thanks!

Framawiki (talkcontribs)

Thank you for your quick answer!

Daimona Eaytoy (talkcontribs)

@Framawiki I checked the filter again, and looking at the last hits it seems like the problem is fixed, could you please confirm? Note that user_blocked is true for partially blocked users, but that's known (phab:T201815).

Framawiki (talkcontribs)

I'll try to monitor and will ping you if needed. Thanks!

Reply to "Strange filter catch"
MusikAnimal (talkcontribs)
The Technical Barnstar
For your amazing hard work in overhauling AbuseFilter and making it not suck in general. You have single-handedly addressed most of the major bugs and feature requests that have been left unattended for years. To top it off, it looks really nice on the frontend now, too! We all can't thank you enough. You. are. awesome. :D
Daimona Eaytoy (talkcontribs)

Many thanks, I really appreciate your words :-) I love to help with it, and I hope we'll get even better results in the future pulling ourselves together.

Reply to "A barnstar for you!"

Extension:SyntaxHighlight fail to invoke Pygments.exe on Windows (probably shell exec is broken on Windows)

7
Quinnj09 (talkcontribs)

Hey,

I wanted to reach out to you rather than have a discussion within a bug where its not really right to do so.

I managed to get the call to work using:

$result = Shell::command(

self::getPygmentizePath() .

' -l ' . $lexer .

' -f ' . 'html' .

' -O ' . implode( ',', $optionPairs )

)

Note that I had to add spaces before and after each - (dash)

But I then have the problem you described However, this isn't a complete solution, as another problem pops out: the process starts running, but never stops.

I wondered if you had any further suggestions on how to complete this solution?

Quinnj09 (talkcontribs)

I have also tried adding < NUL to the end:

[exec] MediaWiki\Shell\Command::execute: "C:\Python27\Scripts\pygmentize.exe -l sql -f html -O cssclass=mw-highlight,encoding=utf-8 < NUL"

But this (as expected) results in no output, so the code block is empty in the wiki page when being viewed by the user.

Daimona Eaytoy (talkcontribs)
Quinnj09 (talkcontribs)

@Daimona Eaytoy this leaves me in an annoying place (I know no fault to the mediawiki developers or yourself) in that I cannot upgrade from mediawiki 1.27.0 to 1.31.0 until I find a solution for this, as we require this to work once upgraded.

Now I know it works using PHP version 5.6.30 (cgi-fcgi) (because my production system uses this) but then its broken in PHP version 7.0.15 (cgi-fcgi) (which is my test system for testing mw 1.31.0)

Im wondering, if theres a way I can get the call:

"C:\Python27\Scripts\pygmentize.exe -l sql -f html -O cssclass=mw-highlight,encoding=utf-8"

to explicitly use version 5.6.30, if I had both versions installed.

Unfortunately PHP version 7 or higher is required for mw 1.31.0 from what I understand (but feel free to correct me)

Daimona Eaytoy (talkcontribs)

@Quinnj09 I understand, and I hope this will be fixed soon. MW 1.31 requires PHP 7+ (see Compatibility) and I can surely say that SyntaxHighlight did work on an older MW release (can't recall which one, maybe 1.30). Unfortunately, I can't give any more help at the moment.

Quinnj09 (talkcontribs)

@Daimona Eaytoy thats fine, thanks for your assistance though. One last question, at a guess do you think it would be this year a solution/fix will be found?

Daimona Eaytoy (talkcontribs)

@Quinnj09 I don't know :-) It depends on whether someone is planning to work on this soon. Any further update will be tracked on the phabricator task.

Reply to "Extension:SyntaxHighlight fail to invoke Pygments.exe on Windows (probably shell exec is broken on Windows)"
Alexmar983 (talkcontribs)

Welcome to MediaWiki.org!

Yes, welcome! This site is dedicated to documenting the MediaWiki software, the software behind many wikis, including that of Wikipedia and the Wikimedia Foundation projects.
Please, take a look at the following pages. They might prove useful to you as a newcomer here:

If you have any questions, please ask me on my talk page. Once again, welcome, and I hope you quickly feel comfortable here, and find this site useful documentation of the MediaWiki software.

Thanks, and regards,

Reply to "Welcome"
There are no older topics