[09:05:11] Nikerabbit: Did Expect collide with BCmath? I see there were some failure to merge it. [09:05:53] jeblad: yes, had to manually resolve the merge conflict [09:06:31] Thanks for fixing it! :D [09:07:29] jeblad: that's my job quite literally :D [09:10:23] Hehe, review of stuff for mw usually don't go so smoothly, but setting up stuff for translation usually goes quite fast. You should have a big barnstar on your chest! [09:10:49] jeblad: wouldn't that be inconvenient? [09:11:02] jeblad: but thanks I appreciate the suggestion :) [09:12:40] The Norwegian barn stars are quite big! https://no.wikipedia.org/wiki/Valdresrose#/media/Fil:Valdresrose_01.jpg [09:51:31] big barns for long winter storage [13:00:57] Cookies for reviewer! =) [13:01:21] Coookieeees! [13:01:35] T233398 [13:01:36] T233398: Create a Vagrant role for BCmath - https://phabricator.wikimedia.org/T233398 [13:01:50] T232511 [13:01:50] T232511: Create a Vagrant role for Expect - https://phabricator.wikimedia.org/T232511 [13:03:08] It is 13 and 14 lines, nearly half of it isn't even code! [20:00:36] I'm curious if anybody knows if wikis change default twinkle configs [21:06:38] I'm setting up my first wiki and am having trouble with the popup extension. It's working fine for references, but when I mouseover a wikilink, the popup has no content (no image or text) and only shows the three dots at the top left of the popup and cog at the bottom right. I've installed TextExtracts and PageImages and everything else is running [21:06:39] fine on 1.33 [21:18:08] Pete97: If you installed TextExtracts and PageImages before editing/importing the wiki content, you'll need to run refreshLinks.php maintenance script to generate that data [21:21:38] I can no longer join #mediawiki-dev? [21:22:21] that was a channel? [21:22:30] JeroenDeDauw: #wikimedia-dev? [21:22:45] JeroenDeDauw: looks like it's #wikimedia-dev [21:23:32] Do they not both exist? [21:23:48] #wikimedia-dev is full of commit message spam [21:24:00] Anyway where do I best go for technical MW questions? [21:24:05] I've never heard of #mediawiki-dev [21:24:10] JeroenDeDauw: Here is fine [21:24:32] or one of the more specialized channels if its about something specialized [21:25:00] If it was about something wikimedia, i would say #wikimedia-tech , but if its not wikimedia specific, then i guess here [21:26:09] Alright. I have a special namespace with JSON content type. The Read tab shows this JSON on a map (its GeoJSON). This map has an edit UI [21:26:18] Now I want the user to be able to save their edits [21:26:29] With as little special code in my extension as possible [21:26:42] One thing I could do is get the GEoJSON from the map and send it to the edit API [21:26:57] Using mw.api.edit [21:27:31] If you didn't override it with content handler, wouldn't the edit tab just still be there and they can edit like normal? [21:27:38] Is there a better way of doing that with JS? A dedicated edit thing? [21:27:53] The tab is still there yes [21:28:04] I'd like to keep it, though probably rename it to "Edit source" [21:28:09] So people can paste in GeoJSON [21:28:23] Maybe later I make a dedicated UI for that [21:28:45] Ideially I do not need to use the edit api module at all [21:28:46] I would say if the fancy editor is already JS, then api would probably be easiest [21:29:12] I'd like to do a normal page save, so that when there is an edit conflict or so, MW shows the normal UI, and I do not need to reinvent everything [21:29:28] Seems easy for the happy path yes [21:30:00] Its possible to subclass the EditPage class, override some of the methods, and have content handler inject that EditPage subclass instead of the normal one [21:30:17] EditPage, isn't the most elegant to subclass, but I've seen people do it before, and it works [21:30:49] That would just change what people see on the edit tab right? [21:31:07] I like to keep the edit tab to the regular JSON editing behavior [21:31:16] Meh no screenshots on IRC :D [21:32:01] bawolff: https://user-images.githubusercontent.com/146040/65464539-50786080-de5a-11e9-8920-bd5dc2a51f85.png [21:32:04] I think you could add a new Action subclass, which calls your edit subclass [21:32:14] That is my edit UI. Which is on the Read page, not the edit page [21:32:14] *EditPage subclass [21:33:04] What I am looking for is how to trigger the same saving process you get when going to the Edit tab and clicking save, but then from JS on the Read tab [21:33:14] The approach that CollaborationKit uses https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/CollaborationKit/+/270c059829040d668839af3450107a11e123d9ae/includes/CollaborationKitHooks.php [21:33:45] is to use different "formats", to trigger different EditPage behaviours [21:33:53] Not sure its the best approach, but it is an approach [21:34:16] I don't need different behaviours. I just want to use the default for now [21:35:04] The different behaviour being basically edit source vs edit something fancier than source, but not quite visual [21:36:53] But i would say, probably easiest is create a custom Action that hits a subclass of EditPage, which JS sends an ajax request to, but injects the html into the page if its not a success response [21:37:02] Not the most elegant, but probably the least code duplication [21:40:35] Alright thanks! [21:59:54] I decided to just go with the API edit approach for now. [22:00:19] So I have some JS on a page with a variable holding new content for that page. What is the best way to save that as a new revision? [22:00:33] Ideally I do not want to deal with things like CSRF tokens [22:00:41] Is there a ready made abstraction for this? [22:01:51] There's the mw.Api module [22:02:04] It should abstract away the csrf stuff [22:02:35] https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Api.plugin.edit [22:03:19] Can't link to the actual section, but if you expand it, it has examples [22:03:56] Right looking at the code/comment itself new [22:04:10] Apparently earlier I was looking at some code using the API in a silly way [22:05:00] bawolff: know any good example of using api.edit? [22:05:19] oh nvm [22:05:36] I don't usually do js stuff, but i imagine there's quite a few around [22:07:54] Search for api.edit did now get me anything in my local code [22:08:25] But the doc is probably good enough [22:22:24] baha... [22:22:33] I'm passing mw.config.get('wgTitle') as first argument to api.edit [22:22:41] Which apparently does not include the namespace [22:31:29] wgPageName i think does, because that's not confusing at all [22:34:21] Hi can someone review my OAuth application( https://meta.wikimedia.org/wiki/Special:OAuthListConsumers/view/222d9577bce5f77eef1c262ffefe0faa ). I have successfully test the tool with account.(https://hi.wikipedia.org/w/index.php?title=File:K.G.F_Chapter_1_poster.jpg&action=history) [22:43:57] Jayprakash12345: this isn't the right channel for that; we're a general mediawiki support channel. Your best bet is likely to follow-up on wiki with whomever normally reviews those [22:44:32] it's very likely that your request here will be overlooked (if the people who can approve it are even in here) [22:47:22] Its actually mostly devs & stewards who can approve those. #wikimedia-tech would be marginally better [22:48:31] eh, it works. [22:49:59] although if it's not super urgent, oauth admins get wiki notifications about new apps so they'll see it anyway [22:51:57] hello, is it possible to make scribuntu check if a file on Commons exists? [22:52:06] tgr: Thank you for your quick response, Now my app is working for other accounts as well. [22:54:04] baruna: You can tell if a file exists, but i'm not sure its possible to distinguish between a local file and one from commons [22:54:44] bawolff: the documentation says mw.title.makeTitle( namespace, title, fragment, interwiki ) [22:55:07] but I didn't make it to use the interwiki argument properly [22:56:07] For files from commons, you should not use an interwiki [22:58:27] mw.title.new( 'commons:File:Cs-člověk.ogg') this didn't work either [22:59:08] nor mw.title.new( 'File:Cs-člověk.ogg') [22:59:20] so no idea how to do it and it it is possible [23:03:09] baruna: mw.title.new( 'File:Cs-člověk.ogg').file.exists [23:06:09] bawolff: thank you