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