[10:40:12] anyone knows where's the config file for wiki redirecting to incubator (i.e. ko.wikivoyage.org )? [10:44:26] revi: puppet IIRC [10:44:32] you back? [10:44:37] not really [10:45:02] mutante knows about puppet/DNS stuff [10:45:21] I was digging puppet for 20 minutes and then gave up [10:46:20] can't blame you, it's complicated [10:47:21] it might not be in puppet though [10:48:06] yeah.... [10:50:27] revi: okay so I see a correlation in https://github.com/wikimedia/operations-dns/blob/master/templates/helpers/langs.tmpl [10:50:54] if the language is there, but the project does not exist, it redirects you to the relevant incubator page [10:51:06] but I guess this depends on some other config [10:51:36] yeah it must depend on some other confiug [10:51:42] which is unknown to us [10:52:00] https://phabricator.wikimedia.org/source/mediawiki-config/browse/master/wmf-config/missing.php maybe this? [10:52:17] yeah looks like it [10:53:17] yup, I saw that previously references [10:53:20] *referenced [10:54:05] WS and WV indeed show 404 because of beta.wikiversity and oldwikisource [14:00:08] Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: @Tim_WMDE & @amir1 - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:50:10] Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @Tim_WMDE & @amir1 - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:51:37] Quick question before the meeting starts, sorry if I’m interrupting it: is there anything on Phabricator about Wikimedia Maps that stopped working? (test on https://ru.wikipedia.org/wiki/Казань) [14:51:58] stjn, steps to reproduce? [14:52:19] Just go there, see if maplink is clickable (for me and others it’s not). [14:52:27] https://phabricator.wikimedia.org/T203427 [14:53:52] Hm. I think that person is after the wrong solution (since after removing CSS for pointer-events the issue of not having maplinks that work persists). Thank you. [14:54:09] I've pinged about the task in #wikimedia-discovery - it's close to "unbreak now" for me... [14:54:30] I'd say it's UBN for me but not touching [14:56:41] fwiw I see the maps fine on Edge [14:56:45] trying Chrome [15:02:31] Hey everyone, me and amir1 are here to answer your questions at this week's technical advice IRC meeting [15:03:09] hello, welcome to TAIM [15:05:00] Amir1: Thanks [15:06:30] This is my first TAIM. I wish to ask if there is a particular way to use Special:UserLogin from an extension. [15:06:57] !authmanager [15:07:04] guess I'm in the wrong channel for that [15:07:21] Eugene233: Do you mean, you want to extend the Special:Userlogin form [15:08:09] in which case you'll want to look at https://www.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager (little bit complicated) [15:08:22] Hello! I have a question regarding OOUI; specifically, the ToggleSwitchWidget. Is there anyway to replace the existing (PHP generated) checkbox with the ToggleSwitchWidget in the way that the form still works? [15:08:44] Eugene233: Or do you mean you just want your extension to log in, in which case i'd ask what are you trying to do, as that's not something extensions usually do [15:10:53] mainframe98: let me check [15:11:41] bawolff: Since the extension is used to edit wiki pages, it will be good to verify if the user is logged in before doing the edit. So login from the extension. [15:11:55] mainframe98 Do you mean implementing it into a standard HTML form? [15:12:06] Eugene233: It sounds like you don't really want to log in, so much as check if the user is logged in? [15:12:31] it which case, you can often do that via $this->getUser()->isLoggedIn() [15:12:48] tim_WMDE: in a MediaWiki HTMLForm. There's an existing form with a checkbox that would convey its meaning clearer with a ToggleSwitchWidget [15:12:50] (Assuming $this is an instance of IContextSource, which is true for special pages and many things) [15:15:17] bawolff: ok [15:16:01] mainframe98: https://www.mediawiki.org/wiki/HTMLForm/tutorial3 Have you seen this? [15:16:05] Eugene233: See also https://doc.wikimedia.org/mediawiki-core/master/php/classUser.html [15:16:21] This basically covers everything with HTMLForm [15:16:28] I use that often [15:17:55] Amir1: A lot. That's what I always use when developing with HTMLForm. Unfortunately, on the PHP side of things, we only get the plain checkbox in OOUI, [15:18:28] HTMLForm's toggle type is just an alias for check, they result in the exact same checkbox [15:21:06] Did you set your HTMLForm factory to use the OOUI toolkit? [15:21:17] As described here: https://www.mediawiki.org/wiki/HTMLForm#Display_formats [15:21:42] tim_WMDE: It's a custom form inheriting from OOUIHTMLForm [15:22:15] Frankly, the form itself works fine, as does the widget infusion. I'm just not sure how I can replace a regular checkbox with the ToggleSwitchWidget kind [15:23:46] mainframe98: https://doc.wikimedia.org/oojs-ui/master/demos/?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop ? [15:26:08] Amir1: I've seen that one. Those are all the JavaScript widgets. I know I can just use a ResourceLoader module and add a ToggleSwitchWidget to the form, but I need the widget to replace the existing checkbox, [15:26:13] but still submit the form correctly [15:26:52] I think you need to do something like they do here: https://gerrit.wikimedia.org/g/mediawiki/extensions/AbuseFilter/+/5b401328ac64fca69c0146523cbf688e79024165/includes/Views/AbuseFilterViewExamine.php#198 [15:27:47] Create a new ToggleSwitchWidget and throw it into your HTML, though I have not done this myself and it might not be super trivial / it might break the form without further JS adaptions [15:28:21] mainframe98: What I did for several cases was to actually change the existing behaviour and send the new data and parse it (with b/c of course) [15:28:44] I think I did it with on Special page before [15:28:50] *one [15:29:05] I don't know if I can be clear in this case [15:30:40] tim_WMDE: The issue with that example is that they manually build the form. If I had to do that, I'd end up re-inventing HTMLForm, with all it's disadvantages. [15:30:58] * With all the disadvantages of re-inventing [15:34:49] Oh, and another question before I forget to ask, [[mw:Best practices for extensions]] doesn't mention what the convention for names of sql files in extensions is. [15:35:57] mainframe98: The ToggleSwitchWidget only works with JavaScript, because the regular checkbox element is replaced with custom DOM nodes. I know that there is some way to infuse server-rendered forms with OOUI on the client side. [15:37:02] mainframe98 Do you have a code example how you're generating the form in PHP? [15:38:02] chiborg: It's just a simple HTMLForm checkbox, like on the mw.org tutorials: https://www.mediawiki.org/wiki/HTMLForm/tutorial3#check [15:39:22] mainframe98: I haven't seen such convention for extension but I know most extensions follow this type of convention: https://github.com/wikimedia/mediawiki-extensions-ORES [15:39:32] https://github.com/wikimedia/mediawiki-extensions-ORES/tree/master/sql [15:40:34] Amir1: That's a very useful example. I'll use that one [15:40:47] Amir1: Thank you! [15:40:51] mainframe98: if you have any questions, let me know [15:41:38] In addition to what Amir wrote, you can always also search other projects with some relevant keywords and see what they did. For example, in this case you may want to have a look at all extensions which use onLoadExtensionSchemaUpdates if that's what you are doing: https://codesearch.wmflabs.org/search/?q=onLoadExtensionSchemaUpdates&i=nope&files=&repos= [15:41:52] From there you quickly see the pattern that Amir already showed you [15:42:24] mainframe98 I found the section "Adding JavaScript behaviors" at https://www.mediawiki.org/wiki/OOUI/PHP_examples, where there is an example of how to add client-side code. So you'd have to add the 'infusable' key to your PHP initialization code and in JavaScript call OO.ui.infuse on the element when the page has loaded. [15:43:37] chiborg: I've done that. Infusion is not the issue; that works as expected, rather, I need to replace the now infused widget with the ToggleSwitchWidget, and I can't seem to get that to happen [15:44:19] Is your code publicly hosted somewhere that we could look at? [15:46:39] tim_WMDE: There's no actual code, because I'm just testing here. I can create a quick gist with my experiments so far though [15:47:55] Ah alright [15:48:21] But in that case I think my initial link I sent you is really the best thing you can do I am afraid [15:49:14] tim_WMDE: https://gist.github.com/mainframe98/7da5a4849be7e159049e6e00025dcc45 [15:49:25] Have a look at this URL, at the top you can switch between JS, PHP and Infuse: https://doc.wikimedia.org/oojs-ui/master/demos/demos.php?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop [15:49:43] You can see that the ToggleSwitch is not available for PHP / Infuse because its missing from the list [15:50:18] So the only way to add it would be to create a custom solution as sort of indicated earlier [15:51:03] tim_WMDE: I got that far. I'm not attempting to do anything at the PHP side of things, but I want to give users using JS the toggleSwitchWidget instead of the regular checkbox [15:52:36] To recap, I have a form with a PHP generated OOUI checkbox. I can infuse that checkbox, but I'd rather show a ToggleSwitchWidget to users. I don't know how I should replace (using JS) an existing checkbox with a ToggleSwitchWidget [15:52:36] Ah okay, apologies for the misunderstanding, I see now [15:53:16] As in, when the user submits, the state (true/false) from the toggleSwitchWidget is sent as if it where the original checkbox [15:55:33] mainframe98 thanks for your patience, I think I get it now. My appracah would be to not use infuse in this case, but to hide the checkbox element, put a newly created ToggleSwitchWidget in its container, just like you do now. Then add an event handler to the ToggleSwitchWidget that changes the checkbox value in the background. [15:55:59] chiborg: That's genius! [15:56:17] I'll give that a shot. That sound like the best approach here. [16:01:35] mainframe98: You're not alone with the problem, there is also this issue: https://phabricator.wikimedia.org/T182466 [16:02:44] chiborg: Thank you for the link to that task, I'll subscribe to that. [16:02:58] Thank you all for the help! [16:04:23] Well, that concludes the Technical Advice IRC Meeting for the time being. The next one will start at 11 pm UTC. Thanks for your input chiborg [17:41:17] WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER [17:41:19] WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER [17:41:20] WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER [17:41:21] WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER [17:41:59] mark: --^ [17:42:01] WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER [17:42:02] WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER [17:42:03] WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER WAGGIE = LOSER [21:11:06] Hello everyone, I am having a hard time trying to build a PHPUnit test that requires csrf token to access the api endpoint, the extension in question is ReadingLists and I am following this document: https://www.mediawiki.org/wiki/API:Calling_internally [21:11:33] I keep getting the exception `ApiUsageException: Invalid CSRF token.` [21:13:36] Does someone know if there is a different way than the one pointed out on the Wiki page I am following? [21:15:23] Usuaully in unit tests, you more want to test the individual functions, not call the api internally [21:15:30] But those docs are the correct one [21:17:12] mateusbs17: I think maybe you should use $this->doApiRequestWithToken() [21:17:46] btw, if that turns out to be correct, please update the wiki page with any fixes it needs :) [21:18:11] Thank you bawolff, I will test it right now [21:46:45] I am now getting `ApiTestCase::setUp can be slow, tests must be "medium" or "large"`, I will try to dig more on documentation and take a deeper look into my code. [22:00:06] You just need an @medium tag [22:00:07] Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: @RoanKattouw & @Niharika - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [22:07:36] Thanks legoktm it really helped me! [22:15:23] :)) [22:50:14] Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @RoanKattouw & @Niharika - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [23:00:38] * Niharika waves [23:01:13] Hey all. This is my first TAIM and I'm so excited to be here. [23:01:28] Hi Niharika [23:01:44] Hi physikerwelt. How're you doing? [23:01:58] I'm fine. My first meeting too. [23:02:06] How are you? [23:02:16] o/ [23:02:28] Pretty good. [23:02:38] We have a legoktm! [23:03:26] I'm only half here, I was sick most of the day [23:03:53] RoanKattouw: Ouch. :( [23:04:15] RoanKattouw: get well soon [23:04:33] Working on it :) I'm in the crackers and mashed banana stage rn [23:04:44] Breakfast of champions. [23:04:57] :-) [23:07:42] I would like to get some technical advice on debugging CI problems... not sure if this TAIM is the right format though [23:08:21] physikerwelt: Which ones? [23:08:31] We can try and help. [23:08:57] I am looking at the math extension tests https://gerrit.wikimedia.org/r/#/projects/mediawiki/extensions/Math,dashboards/default [23:10:08] physikerwelt: Any specific commit or all of the failing ones? [23:10:16] with the quibble jobs the config seems to absent [23:10:32] it is for all commits [23:10:49] 18:12:24 Error: 1146 Table 'wikidb.LexemeSpecialWhatLinksHereTest-table-user_groups' doesn't exist (/tmp/quibble-mysql-wtn4myrr/socket) [23:11:49] Hmm, I'm not quite sure what's going on with it. [23:11:59] with try and error I was able to work around the problem [23:11:59] https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Math/+/455482/ [23:12:37] however, there is a really bad hack hidden [23:12:37] https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Math/+/455482/17/src/MathRenderer.php [23:12:51] so I don't think this patch will ever be merged [23:14:59] on the other hand patches that are good to be reviewed like that one https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Math/+/442124/ from Jun 25 can't be reviewed since the tests are broken [23:16:39] As I understand overwriting jenkins and merging manually should be avoided [23:17:18] I wonder if legoktm has an idea about this. I'm looking for older commits that do this but I can't immediately find one. [23:17:44] if the tests are still broken (and you verified your change works) then force merge it until ci is fixed. [23:17:45] Hi [23:18:29] Hmm [23:18:45] the problem is that default config from extension.json is not applied to the globals? [23:19:13] TimStarling: yes [23:19:40] at least not in the quibble job [23:19:53] Ohai. I was going to suggest pinging Tim for help since he recently figured out how to reproduce complex CI failures :) [23:20:29] by the magic of installing a fresh extension-free wiki [23:20:37] and running the command as it appears in jenkins [23:20:57] that's where my second part of the question I had for the question of todays meeting comes up. How can I run the job localy. I managed to run quibble. with and without docker but I am not sure how I can see and change the config [23:21:44] there's no extra config besides what quibble injects [23:23:44] so all I need to do is to set ZUUL_PROJECT [23:25:18] the best guide I could find is on https://gerrit.wikimedia.org/r/#/c/integration/quibble/+/452335/2/doc/source/build-reproduction.rst [23:26:43] That looks right [23:26:57] With hashar's comments [23:27:12] Sorry, I need to go to class now [23:27:39] I can have a go at reproducing it but it will probably take longer than this meeting [23:28:02] Thanks legoktm. [23:28:31] Thank you. I just wanted to be sure that I am not just missing the simple trick that everyone else is aware of [23:29:36] and why is this only a problem for math? [23:31:59] physikerwelt: It might not be a problem just for math. [23:33:12] TimStarling: What's a good way for physikerwelt to get your guidance on this? Should they file a ticket and take this discussion there? [23:34:12] I'm looking at it now [23:34:38] but a ticket would be good in any case [23:34:48] There is T202223 but the scope of the ticket is not clear [23:34:49] T202223: WikibaseLexeme LexemeSpecialWhatLinksHereTest tests fail on Math CI - https://phabricator.wikimedia.org/T202223 [23:37:09] what is MathDataUpdaterTest? [23:38:07] that's a test for a different hack that shows formulae in wikidata without messing up with the page cache [23:38:56] T173949 [23:38:57] T173949: Lua module Module:Internet_Archive is causing parser cache pollution - ext.math.styles is sometimes loaded - https://phabricator.wikimedia.org/T173949 [23:39:55] you can see the exact LocalSettings.php jenkins used, as a build artifact [23:40:24] it has 26 extensions installed [23:40:56] where would I get it from this change https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Math/+/458320/ [23:41:02] for example [23:41:25] i think from https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/ [23:41:29] https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/15126/console -> https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/15126 [23:41:37] https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/15126/artifact/log/LocalSettings.php [23:42:00] thank you [23:42:22] from the jenkins link in gerrit you click status, then under build artifacts, click the + button [23:46:21] oh I see, in integration/config/zuul/parameter_functions.py, Math depends on Wikibase, and then Wikibase depends on a bunch of extensions [23:46:48] including CirrusSearch which depends on a bunch more extensions [23:47:42] so what we need is a test wiki with these 26 extensions on which to run tests [23:49:42] can that be setup with the quibble script [23:54:12] oh did you see that $wgWikimediaJenkinsCI = true; [23:55:28] yes [23:57:05] --with-extensions is annoying, you either get all extensions or none [23:58:17] I mean maintenance/install.php --with-extensions [23:59:13] yes that makes sense to me https://phabricator.wikimedia.org/T201496#4487976