[01:16:11] harmaahylje: cargo is similar to semantic mediawiki, but afaik, it has only one developer, whereas semantic media wiki has many [01:23:15] I have a question: based on this {https://stackoverflow.com/questions/15273180/semantic-mediawiki-ask-query-displaying-nested-properties-on-the-same-query} to make queries about a particular page, say, if I need to query a particular page for which categories it belongs to, I have to use subproperties. Is there an alternative way to make such queries, i.e. without the use of subproperties? [05:27:50] hi, I'm looking for a way to use the categories api module here: https://www.mediawiki.org/wiki/API:Categories. I can get the categories a page belongs to that way, but often categories belong to larger categories etc -- is there any way to check whether a page belongs to a category further up the category hierarchy? [05:53:44] ningu: no, you have to build the graph manually [05:57:40] legoktm: hrm ok, well, I'll see how I can work with that I guess [05:59:14] ningu: I *think* https://meta.wikimedia.org/wiki/PetScan/en might be able to do it but I'm not 100% sure [06:01:18] I'm trying to write a user script that will do something if a page belongs to a particular super-category [06:01:25] it isn't realistic to walk the graph each time [06:02:15] PetScan might work though [06:03:39] ok maybe not, it seems [07:41:47] can anybody help? I have these 3 pages and the code does not seem to work, basically, I want to assign categories using a template {{Categories|AA,BB,CC}} [07:41:51] https://www.irccloud.com/pastebin/CBzv1lVw/ [07:42:18] the page Sandbox 3 does not show anything... :( [07:43:01] what are the parser functions arraymap and show? They don't appear to be available on WMF wikis (at least not documented at https://en.wikipedia.org/wiki/Help:Magic_words) [07:46:03] DannyS712: arraymap is from PageForms: https://www.mediawiki.org/wiki/Extension:Page_Forms/Page_Forms_and_templates [07:47:32] as for show, i'll try replacing it with #ask now [07:48:57] my problem is I need to query the categories to which a particular page belongs, how do I do that best? [07:49:04] using subcategories? [09:05:01] alright, the arraymap function is broken then I suppose.... :( [17:13:44] Hi, I enabled several extensions with mediawiki-vagarant and ran provision. However, Windows Defender detected some files in a particular extension folder as threaten. Should I report this in wikimedia phabricator as a security issue or a general issue? Or report this to Microsoft as a suspected misdiagnosis first? [17:17:22] which extension? [17:19:20] and/or files [17:20:39] I couldn't know which extension uses it, but some files in SyntaxHighlight_GeSHi folder had detected. However, syntaxhighlight doesn't use GeSHi now, and I didn't enabled syntaxhighlight directly, neither. [17:21:10] Before provision, I enabled codeeditor, codemirror, parserfunctions, randomselection, scribunto, urlgetparameters, variables, confirmedit, mobilefrontend [17:21:50] Extensions have depedancies [17:21:56] So it's possible one or more of those enabled it [17:22:05] *dependancies [17:24:08] Do we really need +z on this channel? [17:24:29] Oh, randomselection failed to enable, because the action doesn't exist. So, it's not candidate [17:25:06] Where can I see dependencies of extensions? [17:25:25] Nemo_bis: probably not? [17:25:59] What does it even do without the modes it's supposed to relax? O_o https://freenode.net/kb/answer/channelmodes [17:26:36] lets people that were quieted (+q and also +b before they leave/get kicked) still talk, and their messages get received by ops [17:26:47] gustmd7410: https://github.com/wikimedia/mediawiki-vagrant/blob/e001c864897949fd73a9fbb6367545612627d231/puppet/modules/role/manifests/scribunto.pp#L6 [17:28:13] Then, I should report this with scribunto tag? However, I still wonder it should be security report or not. [17:28:30] * should I [17:28:33] well, which files [17:28:39] I imagine it's flagged the binaries [17:28:54] It's almost certainly an issue with Defender [17:29:15] supply chain attacks do happen from time to time, but false positive is more likely [17:29:45] without knowing which particular files were tagged, it's a bit hard to say [17:30:00] I guess I can try it myself [17:30:01] https://dpaste.org/GWhL [17:30:19] rofl [17:30:31] ok yeah definitely FP [17:30:35] most of those are MS files themselves too [17:30:37] I like how they tagged their own stuff too :P [17:31:04] I'd suggest filing an issue at https://github.com/Microsoft/tolerant-php-parser [17:31:12] Thanks [17:31:42] well I mean it'd be a real positive if you were running a server and those were exposed in a way that someone could use them to execute code I suppose [17:32:06] in this particular context, it's a non-issue [17:33:06] curiously, tests is in .gitattributes as export-ignore [17:33:59] specifically the phan-taint-check-plugin one is an easy RCE if it was ever somehow web-accessible [17:34:15] (the MS ones would require register_globals or something similar to be dangerous) [17:35:17] temporary removal to let legit user in, see #wikimedia-ops [17:35:36] could +e them [17:35:42] but yeah that's a stupid wide ban [18:13:33] o/ buovjaga [18:13:34] We are testing 1.35.1 and are running into trouble with MediaWiki-Bugzilla extension: https://dpaste.org/AG1W [18:15:54] JS probably needs bringing up to date [18:16:12] Depending on which extension... [18:16:13] https://www.mediawiki.org/wiki/Extension:Bugzilla [18:16:16] >This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. [18:16:44] https://github.com/mozilla/mediawiki-bugzilla/ [18:16:47] no changes in 3 years [18:16:58] Hmm https://www.mediawiki.org/wiki/ResourceLoader/Core_modules#mw.loader.using https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.loader-method-using [18:17:14] >MediaWiki 1.17 or above. [18:17:20] It's not really a surprise it's broken [18:17:57] yes, I am not surprised :) but perhaps it is not a huge deal to get it working? just wondering where to dig in further [18:18:16] You're probably going to have rabbit holes of problems [18:18:56] why does the extension ship its own jquery [18:18:59] there is also this, but it does not touch JS: https://github.com/mozilla-it/mediawiki-bugzilla/commit/35eab15321e5fc2d2c32ff31e058f18ab04f4fd6 [18:19:06] only for old MW [18:19:56] another option is https://invent.kde.org/websites/mediawiki-bugzilla or I could just reimplement it fully client-side as a widget I guess :) [18:25:24] I wonder what would be the best way to have separate .js files with https://www.mediawiki.org/wiki/Extension:Widgets Somehow like explained in https://www.mediawiki.org/wiki/Adding_JavaScript_to_Wiki_Pages#Separate_script ? [18:34:06] buovjaga: wrap that line inside tags. You can easily find tutorials about adding script to HTML pages [18:37:35] Vulpix: was just thinking of a situation where I would use a library and it feels icky to inline some rather big pile of minified JS into a widget definition :) [18:38:20] https://stackoverflow.com/questions/13739568/how-do-i-link-a-javascript-file-to-a-html-file [18:38:31] for example this Bugzilla extension I would reimplement using http://tabulator.info/ because I have used it earlier [18:39:52] oh you mean that mw.loader.load line... ok thanks [18:42:06] Actually, you can use with the URL of the script to load, no need to use JavaScript to load another JavaScript :) [18:42:33] Unless you want to load it conditionally, of course [18:43:19] yeah was trying that earlier, but I think our test instance is somehow unable to handle loading those... I guess I have to try some 'hello world' in production [18:43:38] in other words, not even mw.loader works [18:47:23] Hmm, now I noticed it threw "Uncaught ReferenceError: mw is not defined". Could it be that the skin we use is messing up the resource loading? [18:47:43] prod instance is https://wiki.documentfoundation.org/ [19:01:21] on the prod instance I can access that global just fine on my console [19:03:03] how are you loading that js? [19:03:49] Apparently, by adding a [19:08:44] That gives 404, but maybe something to do with the test instance [22:16:12] I asked this on #wikimedia-tech but no response so far (hopefully ok to repeat here) [22:16:17] I have a user script that needs to first detects whether it's on the right kind of wiki page before activating the main code. it's for wikisource and activates for certain kinds of source documents. currently it decides whether to activate if the page is for a Commons filename that begins with a particular string, but that's not very flexible for a large number of files. what would be a better way? [22:23:24] maybe using the category of the index: namespace page and main namespace pages is the only way with this [22:23:43] or continue to enforce the filename req