[05:45:35] hello, can anyone help me with querying stats for qrpedia? [05:45:55] i'm getting different results from the web interface vs the API [05:46:45] This reports zero, but should have 11 for the year: http://stats.wikimedia.org.uk/index.php?module=API&method=VisitsSummary.get&idSite=2&period=year&date=today&format=json&token_auth=anonymous&segment=pageTitle==Fremantle_Town_Hall [07:18:44] Motherfucking video content consumers and shared Internet. It took me 4 minutes of waiting to create 2 small pages. Oh, and constant 'waiting for bits.wikimedia.org' occupying 3 minutes out of 4. [07:19:00] Can someone /please/ look into the "bits" thing and it having a server in Australia somewhere? [07:20:13] i'm in australia and don't have a issue with bits? [07:20:29] can you pastebin a tracert somewhere? [07:20:58] I will try to measure... [07:21:08] p858snake|l, you don't happen to use Vagrant, do you? [07:21:19] no [07:22:25] ok... firebug will give me a detailed 22s load time and counting shortly... I'll tracert as well while it's on it [07:46:20] p858snake|l, http://dpaste.com/135X1J0 [08:07:27] p858snake|l, https://upload.wikimedia.org/wikipedia/commons/9/96/Firebug_load_time_of_mediawiki.org.png [10:19:30] I filed the thing reported some 25 hours ago here at https://bugzilla.wikimedia.org/show_bug.cgi?id=70485 [10:51:22] API returns error {"servedby":"mw1204","warnings":{"edit":{"*":"The unwatch parameter has been deprecated."}},"error":{"code":"mustposttoken","info":"The 'token' parameter must be POSTed"}} [10:51:22] How to fix it? [10:51:23] (I get it since yesterday, before this date it worked correct) [10:51:32] script https://uk.wikipedia.org/wiki/MediaWiki:Voting6.js returns it [10:54:40] make it a POST request :) [10:55:29] https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Api-method-postWithToken maybe [10:57:25] I heard of some new POSTing requirements but ctrl-f doesn't find anything in last two releases of https://www.mediawiki.org/wiki/MediaWiki_1.24/Roadmap ; maybe it's older [11:02:53] but it is POST request [11:06:53] curl 'https://uk.wikipedia.org/w/api.php?format=json&action=edit&unwatch=1&token=(…)&summary=%2B%E2%80%8B&title=%D0%92%D1%96%D0%BA%D1%96%D0%BF%D0%B5%D0%B4%D1%96%D1%8F%3A%D0%92%D0%B8%D0%B1%D0%BE%D1%80%D0%B8%20%D0%B0%D1%80%D0%B1%D1%96%D1%82%D1%80%D1%96%D0%B2%2F2014%2F%D0%93%D0%BE%D0%BB%D0%BE%D1%81%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F%2FOlvin%2F%2B&appendtext=%0A%23%20%5B%5Buser%3AAhonc%7CAhonc%5D%5D%20~~~~~%0A' [11:06:57] (token removed) [11:09:57] (row 238 here: https://uk.wikipedia.org/wiki/MediaWiki:Voting6.js ) [11:27:24] and this https://uk.wikipedia.org/w/api.php?format=json&action=query&prop=info&intoken=edit&titles=3 [11:27:25] returns warning about deprecated parameter [11:27:30] what is correct parameter? [11:34:35] enhydra, vvv: here? [11:38:25] Hi, a noobish question: How to get the page text from the Labs database replica? [11:41:11] following to Ahonc said: does anyone know what is the correct parameter for token since https://www.mediawiki.org/wiki/MediaWiki_1.24/wmf19 ? [11:41:27] (I'm the ukwiki user who imported the script in question) [11:41:51] Never mind, figured it out... [11:51:33] Nick_K: try meta=tokens [11:51:33] https://uk.wikipedia.org/w/api.php?format=json&action=query&meta=tokens [11:51:46] and token will be in parameter csrftoken [11:51:51] istead of edittoken [11:51:58] *instead [11:57:13] Ahonc: that does not help either [11:59:00] looks like changes were submitted by anomie but he is not here... [12:07:48] probably legoktm who reviewed it knows more? [12:51:57] Ahonc: what script is throwing that ? [12:52:17] Ahonc: there was an issue with WikiLove that was also returning the mustposttoken issue [13:00:52] thedj: it was ukwiki arbcom election script [13:01:03] https://uk.wikipedia.org/wiki/MediaWiki:Voting6.js [13:01:42] quite urgent as our arbcom elections are in progress and voting script went out of order on the second day of elections... [13:03:57] lemme take a look at the script... [13:05:07] ugh. that looks like a neatly written script, and it's using sajax :( [13:05:11] hmm, still uses sajax_init_object.. perhaps that's the problem [13:06:46] original script written by enhydra years ago [13:07:49] enhydra is online [13:07:52] here on irc [13:08:06] online but do not respond [13:08:17] give it a bit, he needs to wake up [13:08:27] in possibly around 4 hours maybe [13:08:33] assuming he's in the capital of that country i think he lives in [13:09:08] weird, no, ctcp time returns 13:08 [13:09:17] then just busy, you have to wait for the evening ;p [13:11:13] Not sure if on-topic here, but I made something similar to Reflinks: https://tools.wmflabs.org/fengtools/reflinks/ [13:11:55] Svetlana: according his userpage, he lives in Krasnoyarsk [13:12:12] Ahonc: so row 238 is what it fails on ? [13:12:16] thedj: this script was written years ago [13:12:27] but it worked until 4 Sep [13:12:42] and on 4 Sep was a MediaWiki update concerning tokens... [13:12:50] i know [13:12:52] thedj: I think that row 238. there is one post-request in that script [13:13:10] can i try this somewhere ? [13:13:27] Nick_K: the edit token should be available on every page without getting it via the API, by the way [13:13:52] could you please suggest the fix? [13:14:00] (to MatmaRex ) [13:14:19] * Ahonc will be afk, discuss this with Nick_K [13:14:29] thedj : you can either copy it somewhere, or suggest fixes and I will add them [13:14:53] Nick_K: you can use "mw.user.tokens.get( 'editToken' )" [13:15:03] in any case the script does not work at the moment, it does manage to finish but it fails to edit pages [13:15:18] yeah, [13:15:20] var token = mw.user.tokens.get( 'editToken' ) [13:15:35] then kill the functions votingToken() and votingTokenContinue() [13:16:02] (you'll probably need to change the places that call them to call votingSave directly) [13:16:38] There is a doApiRequestWithToken thingy. Pity this folk uses raw API URLs to query it. He deserves the pain. [13:16:59] I think, anyway. I may have missed something. [13:17:54] yes, this script would be easier to reason about if it used mw.Api, but i'm not going to risk rewriting it right now if i don't have to [13:17:55] well those are pretty new. most wiki's don't rewrite everything every release. not their fault. [13:18:35] I wouldn't risk either as soon as our arbcom elections are in progress and they are relying on this script [13:19:03] yeah. let's just try to change the token logic? [13:19:25] yes [13:20:03] MatmaRex: so you mean that votingToken() and votingTokenContinue() can be remplaced with one single line var token = mw.user.tokens.get( 'editToken' ) now ? [13:20:35] Nick_K: yes, there is already a var token; statement somewhere. append it there. [13:20:39] then remove the functions [13:21:08] and the places where these functions are called of course [13:21:23] Nick_K: let me pastebin it [13:21:57] Nick_K: http://pastebin.com/aDFg07zF – like this should work [13:22:01] (i didn't test) [13:22:22] (or rather, it should work, assuming that the token getting is the actual problem :) ) [13:23:30] it is the only problem - there were no other major changes on 4 Sep, and it worked before that date [13:24:41] yeah, i don't know, maybe there were some API changes that accidentally made sajax not work with it any more, or something [13:25:32] trying this now... [13:28:32] MatmaRex: does not seem to work :( [13:28:57] Nick_K: are you sure you're not using the old cached version of the script? [13:29:42] yes, I used IE and my bot to vote (you can imagine that I never used IE nor I voted with my bot) :) [13:30:00] Nick_K: where can i vote... where can i USE this script ? [13:30:14] will make it easier to figure out what is going wrong. [13:30:45] Nick_K: that doesn't necessarily matter you won't get a cached version :) this is one of the problems with non-gadget scripts [13:31:31] thedj: will now create a simpler version without editcount threshold [13:33:23] wait a secodn... MatmaRex, are you sure it is editoken and not csrftoken? [13:33:23] Nick_K: okay, so this is the voting page, right? https://uk.wikipedia.org/wiki/Вікіпедія:Вибори_арбітрів/2014/Голосування [13:33:36] https://gerrit.wikimedia.org/r/#/c/153110/ says only csrf token work now [13:33:44] MatmaRex: yes it is [13:34:00] you will not be able to vote however (there is a threshold at the moment) [13:34:14] not a problem [13:34:23] and the script is loaded from this URL: https://uk.wikipedia.org/w/index.php?title=MediaWiki:Voting6.js&action=raw&ctype=text/javascript&cversion=0.2016 [13:34:37] Nick_K: there should backwards compatibility for that (otherwise almsot not a single script would work :) [13:34:39] Nick_K: go there, refresh it, make sure you see the new version, then refresh the voting page and try again [13:36:26] MatmaRex: yes, I know that hack (we did introduce this version stuff to deal with caching) [13:36:41] and no, still not working [13:38:03] thedj , MatmaRex : sorry, I will be afc for some 10-15 min [13:39:04] (have some urgent things to do) [13:47:03] Nick_K: re your last edit, i can assure you that mw.user.tokens.get( 'csrftoken' ) is not going to work [13:53:01] MatmaRex: reverted that [13:54:50] changed nothing, still not working [13:54:55] ooooh, i think i see why it doesn't work. [13:55:58] you get an erro saying "The 'token' parameter must be POSTed" because the token parameter isn't posted [13:56:12] you use a POST request, but you put all the parameters in the URL, not in request body [13:56:13] ah, it's in the url [13:56:18] bingo [13:56:25] also, it should be the 'last' one [13:56:35] i guess the API was made stricter about this? [13:57:02] i wonder how to fix it with sajax [13:57:06] could well be [13:57:25] maybe aj.send('token=' + en(token))? does that work? [13:58:37] hmph, let's see [13:59:06] MatmaRex, if you like I have made a pastebin with 0 voting threshold http://pastebin.com/Vwd5z6Wz [13:59:23] not sure you will need it however [14:00:42] you mean put aj.send('token=' + en(token)) just before the POST request line 222? [14:01:44] Post parameters go in the request body? [14:01:49] Since when? [14:01:53] Nick_K: thanks, i already "hacked" that ;) [14:01:59] Nick_K: yes, but it doesn't actually work, i just tested [14:02:12] Carmela: since HTTP 1.0 [14:02:22] I thought they went in the URL. [14:02:26] (or so i think.) [14:04:44] Carmela: nope. they CAN go in the url, but you should put them in the body. (as form/multipart data) [14:05:03] Interesting. [14:05:08] thedj: do you know how to do it, so that i can avoid figuring out? :D [14:05:12] thedj: http://stackoverflow.com/questions/9713058/sending-post-data-with-a-xmlhttprequest ? [14:05:43] https://stackoverflow.com/questions/14551194/how-are-parameters-sent-in-an-http-post-request [14:05:49] Who knew. [14:06:23] Carmela: the first example with just a string should work, i have used it before [14:06:31] http://www.w3.org/TR/html401/interact/forms.html#h-17.13 [14:06:36] FormData probably works as well. [14:12:00] http://pastebin.com/8KsNSKR6 [14:12:08] Nick_K: this might work, then ^ [14:12:13] thedj: sanity check? ^ [14:16:28] MatmaRex: Content-Type [14:16:35] Carmela: isn't this an example as well https://www.mediawiki.org/wiki/Manual:Parameters_to_Special:Export#Retrieving_earliest_5_revisions [14:16:39] not that it will matter in practice [14:16:41] MatmaRex: bingo, it's working [14:16:49] thanks! [14:17:06] whoo [14:17:38] i wonder why it broke [14:18:16] MatmaRex: i left a note on the commit for anomie [14:18:59] Nick_K: by the way, sajax is probably going to be removed in reasonably close future (months or years ;) ), so it's probably a good idea to rewrite that script to use mw.Api [14:19:21] thedj: oh, i was just going to dig through the log to find what broke it [14:20:50] MatmaRex : yes, but it is not the easiest thing, we have not that many users good at js and arbcom elections is not the thing most of people are interested in [14:20:58] and of course, don't fix if ain't broken :) [14:21:14] * if it ain't broke [14:23:23] MatmaRex: problem should be iside https://gerrit.wikimedia.org/r/#/c/153110/6/includes/api/ApiMain.php [14:26:56] Nick_K: i might try doing that, just for fun [14:27:56] MatmaRex: I can't prevent you from having fun :) [14:52:55] Nick_K: https://uk.wikipedia.org/w/index.php?title=%D0%9A%D0%BE%D1%80%D0%B8%D1%81%D1%82%D1%83%D0%B2%D0%B0%D1%87:Matma_Rex/Voting6.js&diff=14765866&oldid=14765801 [14:53:12] Nick_K: i didn't test the code, so no guarantees that it works, but it should :) [14:53:29] ok [14:53:48] MatmaRex : I will test it later, not during elections [14:53:55] thanks anyway [14:53:55] of course [15:19:07] Nick_K: it works now [16:16:33] LOL, wiki.phtml https://meta.wikimedia.org/wiki/Help:URL#Old_versions_of_pages [16:32:14] 18.25 -trololo:#etherpad-lite-dev- [etherpad-lite] JohnMcLear pushed 1 new commit to develop: http://git.io/MWQgGA [16:32:18] 18.25 -trololo:#etherpad-lite-dev- etherpad-lite/develop 2530bf0 John McLear: add changelog and bump v number [17:39:19] The GSoC list is sometimes amusing, I see... good thing I disabled email [17:39:20] In the future, google should warn students before they apply to check [17:39:20] for potential problems, so at this time, here's my list: [17:39:21] - parents, grand-parents, cousins and aunts must be in good health [17:39:26] That's point one! [18:29:48] Nemo_bis, is that really a reasonable thing to enforce? [18:33:47] jeremyb: no, it shows the level of crazyness on that list [18:34:20] which list? [18:40:02] GSOC mentors list [18:42:02] wow, what is this? https://lists.wikimedia.org/pipermail/mediawiki-ng-l/ [18:43:32] the search you mean= [22:21:02] ^demon|away: how to get rid of the LQT search box? it's confusing many https://www.mediawiki.org/wiki/Project:Current_issues [23:17:15] <^demon|away> Nemo_bis: I'd love to get rid of it :p