[14:20:48] Technical Advice IRC meeting starting in 40 minutes in channel #wikimedia-tech, hosts: @Tonina_WMDE & @Lucas_WMDE - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:22:19] Okay... [14:22:39] When does the meeting start and to whom are questions to be placed? [14:23:54] The meeting is every Wednesday from 3 to 4 pm UTC. [14:24:36] There are always two mediawiki-developers present (today @Tonina_WMDE & @Lucas_WMDE) [14:26:03] they are happy to help with advice if you are interrested in developing software for the mediawiki world [14:26:57] * Hauskatze has some questions, will ask when the meeting starts [14:28:12] Nudin_WMDE: I had a different technical question [14:28:26] It's more about asking for a timescale on the implementation of something [14:29:01] If that's not an appropriate query, I can leave now [14:29:32] ShakespeareFan00: you can try your luck, but if it's nothing developed by WMDE we'll probably not know [14:29:41] Namely the timescale on implementing a hash based image comparator for commons [14:29:50] So that copyvios cannot be uploaded [14:30:02] (and deleted ones aren't reuploaded) [14:30:36] Such a comparator at Upload would be needed per proposed EU copyright directive [14:30:59] https://www.bbc.co.uk/news/technology-44546620 [14:31:16] If not's implemented on a reasonable timescale, I might have to consider if I am happy [14:31:28] with WMF project being allowed to use my content [14:32:17] Another technial enquiry was about implementing a simmilar comparator to prevent images deleted for other reasons being reuploaded [14:33:06] (Or at the very least a warning issued during the upload process) [14:35:19] Reasonable question? [14:35:23] ShakespeareFan00: I can't give you an official answer! But afaik the law contains a excplicit exception for wikipedia. Also the law is not yet finished. [14:35:25] https://tools.wmflabs.org/copyvios/ [14:35:44] Nudin_WMDE: It had as far as I know a 'non-commerical' clause [14:35:51] not a "Wikipedia' clause [14:36:18] Wikipedians have generally been luekwarm about 'special-deals' [14:36:20] ;) [14:36:41] andre__: And how integrated is that into the Mediawiki UI? [14:36:59] andre__: Thanks.. [14:37:03] Thats for article text.. [14:37:11] I was thinking about media [14:37:16] namely images [14:37:26] ShakespeareFan00: don't know [14:37:32] Images? See https://phabricator.wikimedia.org/T120453 [14:38:40] Phabricator [14:38:47] Where good ideas go to die :( [14:39:15] On some other tech concerns entirely... [14:39:41] https://phabricator.wikimedia.org/T196440 [14:40:02] ShakespeareFan00: Because good ideas do get implemented when you post them instead at/in ________? [14:40:14] How simple would it be to implement this in Mediawiki [14:40:18] ? [14:40:32] andre__: Sometimes ;) [14:40:41] ShakespeareFan00: Very constructive. ;) [14:40:54] Another good idea - https://phabricator.wikimedia.org/T185379 [14:41:02] Make parser functions subst [14:41:16] So you get the generated output rather than everything... [14:41:37] You can continue pasting links to your favorite parser bugs but I am not sure how that helps anybody. [14:41:38] {{macro:template}} option as I suggest would be VERY powerful for stuff I do on Wikisource [14:42:02] andre__: Hopefully, people will see them, and comment on the tickets [14:42:10] but I won't post anymore [14:42:13] * ShakespeareFan00 out [14:42:14] ShakespeareFan00: "Comment"? [14:42:33] andre__: "No this isn;t needed, you can do it by X method..." [14:42:37] ShakespeareFan00: I have no idea how that helps. But if you have questions on how to make code changes to fix those bugs I am sure that people will be happy to help. [14:43:02] andre__: That's why I posted them on phabricator [14:43:16] in the hope of getting feedback on possible implementation... [14:43:22] Of course things move slowly [14:43:24] :( [14:43:38] ShakespeareFan00: "How can I do X?" questions are for support forums. Bugs and feature requests are for Phabricator. [14:43:52] ShakespeareFan00: if you triage as lowest of course your not going to get a reply :) [14:43:53] Anyway , I'll let you get on with more important things [14:43:55] * ShakespeareFan00 out [14:44:04] Best to leave triaging to the person who will work on it [14:44:14] +1. [14:44:15] Hmm he left [14:44:36] I don't see people working on parser corner cases... [15:01:57] Hello and welcome to this week's Technical Advise IRC meeting with me and @Lucas_WMDE \o/ [15:02:46] hallo :D [15:02:49] o/ [15:04:05] So... first question/issue I think. I was working on Extension:BreadCrumbs2, trying to migrate it to registration when I got blocked by https://phabricator.wikimedia.org/T197154#4280552 [15:04:27] and I don't know what to do to put those defines into extension.json [15:04:42] * Tonina_WMDE is looking [15:06:45] Hauskatze: you could put those two defines into a separate function and specify that as the "callback" in extension.json [15:06:52] “A function to be called right after MediaWiki processes this file.” [15:07:26] though if those defines are only used by the extension, then I think turning them into config settings (as you mentioned on Phabricator) would be more elegant [15:07:32] I see. However I'm not sure I understand how. It's not like config { value: true}, etc [15:07:32] but backwards-incompatible :/ [15:08:17] well, once migrated they'll need to use MW 1.25 or later [15:08:47] so maybe we can do both things in the same patch? [15:09:09] * Hauskatze is melting, hates hot weather [15:10:30] this is what I did before https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/BreadCrumbs2/+/440170/4/extension.json [15:10:36] Hauskatze: global constants are in general poorly behaved [15:10:40] I understand that using callbacks might be easier? [15:10:50] just replace them with class constants and rely on autoloading [15:11:23] James_F told me something in the lines of "poorly behaved" but used different words ;-) [15:12:09] tgr: something like $wgBreadCrumbs2DefineDelim[] ='@'; ? [15:12:38] Hauskatze: why not put this in a function in Hooks.php and define the function as a Hook in extension.json [15:13:00] it's used at https://github.com/wikimedia/mediawiki-extensions-BreadCrumbs2/blob/master/BreadCrumbs2.class.php#L74 [15:13:25] class BreadCrumbs2Constants { const DELIM = '@'; const CRUMBPAGE = 'MediaWiki:Breadcrumps'; } [15:13:44] or a static class variable if it's defined dynamically [15:13:55] tgr: but that'd be for _hook.php and then I put that on Autoloadclasses right? [15:14:00] *hooks [15:14:51] you put it into BreadCrumbs2Constants.php, per PSR-4 naming conventions (classname and filename should match) [15:15:23] and then rely on AutoloadNamespaces, or AutoloadClasses if you want to be compatible with 1.30 [15:15:33] Okay, I'll give it a try. [15:15:44] Maybe I can have a patch by the end of the hour [15:15:55] Hauskatze: sorry, I was confused about the semantics of PHP define() earlier – class constant definitely makes more sense [15:16:22] (I thought some users might redefine those constants, so you would want to use config, but PHP doesn’t really support that) [15:19:41] Hauskatze: :-) [15:26:57] Hauskatze: congrats on the +2 rights btw :) [15:27:30] Lucas_WMDE: thanks :) [15:30:01] Congrats! [15:30:33] next stop: shell! [15:30:59] then you can fix botched renames by yourself :) [15:36:02] xD [15:36:20] tgr: I'd love to but putting my real name in a public Phabricator task is a no-go for me [15:37:21] btw BreadCrumbs2 patch is ready, updating composer and testing before uploading [15:39:18] done: https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/BreadCrumbs2/+/440170/ [15:40:07] * Lucas_WMDE looks [15:40:22] thanks :) [15:41:27] btw James_F do you think https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/UserExport/+/440392/ is okay? [15:41:28] hm, shouldn’t BreadCrumbs2.class.php refer to BreadCrumbs2Constants::DELIM now, instead of just DELIM? [15:41:34] or am I missing some magic import that makes it work? :) [15:41:51] I though autoloadclasses do that? If not, I can ammend that real quick [15:42:02] jenkins should catch that if I am not mistaken [15:42:19] when and if starts working [15:42:26] very important that :) [15:43:50] autoloading should make sure that referring to the BreadCrumbs2Constants class will automatically load the BreadCrumbs2Constants.php file [15:44:04] but the constant is now a class constant, so I think you need to use the class name to refer to it [15:47:35] Lucas_WMDE: this line too? https://github.com/wikimedia/mediawiki-extensions-BreadCrumbs2/blob/master/BreadCrumbs2.class.php#L149 [15:47:55] or rather, every DELIM / CRUMBPAGE should be now BreadCrumbs2Constants::X? [15:48:17] yes [15:48:27] okay that makes searching and replacing easier :) [15:53:05] Hauskatze: Looking now. [15:53:34] Lucas_WMDE: fixed I think https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/BreadCrumbs2/+/440170/5..6/BreadCrumbs2.class.php [15:54:02] thanks jdf [15:54:29] yeah, that looks better :) [15:54:40] zuul queue is so full :( [15:54:52] phpunit passed before so if it doesn't pass now we know why heh :) [15:54:57] indeed, full [15:55:30] root@contint1001:~$ sudo rm -Rf * :P [15:56:59] * Lucas_WMDE wonders how much would break if you just emptied the root user’s home directory [15:57:19] I would think that should ideally be survivable? [15:57:30] pretty everything probably, they do empty the /workspace/ folder from time to time when it gets full [15:58:03] well you’re just deleting /root/*, not /* :P [15:59:44] Lucas_WMDE: i don't think ~root is used for much these days anyway. [15:59:53] yes, hopefully [16:01:14] oh fun [16:01:17] try sudo less /root/.ssh/authorized_keys :) [16:02:31] CI succeeded \o/ [16:03:06] yay [16:09:47] oh, um, I just noticed the Technical Advice IRC Meeting should’ve ended ten minutes ago :D [16:09:53] thanks to everyone who participated today! [16:10:05] and if you missed the meeting, remember you can always ask on https://discourse-mediawiki.wmflabs.org/ as well :) [16:12:33] thanks for your help [19:15:26] If I `git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git mediawiki` and `cd mediawiki/extensions` and `ls` there are no extensions. If I `git checkout 1.31.0` then there are empty extension directories like `extensions/ParserFunctions` and `extensions/ReplaceText`. [19:15:32] This is because the release branches have submodules for common extensions, skins, etc. If I don't want to use submodules to get these extensions, I can still manually git-clone them and as long as I use the same version as specified in `.gitmodules`. [19:15:37] If, however, I checkout a different version, then running `git status` from within the mediawiki directory shows uncommitted changes. Is there some way I can (1) use git to manage mediawiki core and (2) checkout different versions of extensions specified by `.gitmodules`? The best I've come up with thus far is to modify $wgExtensionDirectory and $wgExtensionAssetPath to put extensions elsewhere, such that there is no con [19:17:12] Might be a question for #mediawiki or #wikimedia-dev as this channel is about "Technical help for Wikimedia wikis" as per channel topic. [19:18:38] andre__: thanks...i'll head to #mediawiki [20:14:55] Hi [20:16:18] why do I get a 404 on the full res version of this file? [20:16:24] https://commons.wikimedia.org/wiki/File:Telephone_technician_checking_lines._Savar_region,_north_of_Dhaka._Bangladesh_2004._Photo-_Heldur_Netocny_(10728789944).jpg [20:16:49] File not found: /v1/AUTH_mw/wikipedia-commons-local-public.6f/6/6f/Telephone_technician_checking_lines._Savar_region%2C_north_of_Dhaka._Bangladesh_2004._Photo-_Heldur_Netocny_%2010728789944%20.jpg [20:24:20] well, i was just replying [20:24:57] but that file loads for me. the URL jay_ gave seems wrong, with parentheses replaces with %20 instead of %28/%29 [20:25:04] replaced* [20:27:59] checked the log and it seems that the noscript addon for firefox thought this is some sort of XSS. [20:30:14] jay_: that file loads for me. the URL you gave seems wrong, with parentheses replaced with %20 instead of %28/%29 [20:33:06] Seems like a bug with NoScript. Works fine if I disable it. [20:33:25] Log: https://pastebin.com/MhyMgDjx [22:28:48] Wikipedia translator with many flaws, add Google translator traslate