[05:15:27] hi [05:16:00] i have a private wiki, i would like to set up an email notification to alert me when specific pages are viewed and by who, does anyone know if this is possible? [05:30:36] Hi dwaan. [05:30:42] You could write a custom extension to MediaWiki, possibly. [05:30:55] Or, hmm, you could maybe get your Web server access logs to include the username of the current usre. [05:30:58] user [05:31:13] yes developing extension is a bit beyond me [05:31:20] using access log is my last resort [05:31:22] Why do you want to track reads? [05:31:48] need confirmation when people have read policy documents [05:31:59] Without them knowing? :-) [05:32:11] I mean, they could submit a form/press a button instead. [05:32:22] Instead of just assuming that a page being opened is being read. [05:32:32] Probably easy enough to do it with JavaScript. [05:32:41] i was hoping i could somehow use the standard notification extension [05:32:44] The e-mail part would be a bit annoying, but probably doable. [05:32:53] yeah [05:32:58] ok thanks for your advice [05:33:05] Have JavaScript check the current page title and then ping an end-point with the current user's name. [05:33:17] And that end-point could then trigger an e-mail notification. [05:33:27] Or... you could use the built-in Special:EmailUser functionality or similar. [05:33:36] Or post to a talk page and have that trigger an e-mail notification. [13:36:47] hey! I'm trying to upload a file to the API using the chunked method described on https://www.mediawiki.org/wiki/API:Upload#Chunked_uploading [13:37:13] but it fails with "Must supply a filekey when offset is non-zero" even while the offset *is* zero (because it's the first chunk) [13:37:50] Here's my raw request and response: https://paste.sigio.nl/view/8f671af0 [13:38:06] as I am looking at it, I see my token is... broken. lemme fix that first btw [13:54:45] my token getting request works fine on mediawiki 1.26 but not on 1.28 [13:55:38] but, edit tokens were deprecated in 1.24 and replaced with csrf tokens, right? [13:55:50] so 1.26 and 1.28 should behave the same, right? [13:57:00] this is my result from 1.26: {"batchcomplete":"","query":{"tokens":{"csrftoken":"d6c45a637582f5579de6dfc89b7f1b665b0c09e7+\\"}}} [13:57:09] and this is my result from 1.28: {"batchcomplete":"","query":{"tokens":{"csrftoken":"+\\"}}} [13:57:56] so, how do I get a token from 1.28? (preferably in a way that won't break on 1.26) [14:17:37] Is there a possibility to insert a blank
inside an HTMLForm $formDescriptor ? [14:18:04] I looked at 'type' => 'info', but that doesn't help me much since it includes the info at the bottom of the page [15:32:35] okay, I fixed my token. or at least that's what I think. but the api is still giving me code:'badtoken' and info:'Invalid Token' [15:34:33] Peetz0r: Are you using the token you got from the api? Your token will change any time you log in or out [15:36:04] Peetz0r: just log out and use +\ [15:37:13] DanielK_WMDE_: I need to be logged in to do what I'm doing (uploading an image) [15:37:39] bawolff: yes I am using the token I got from the api, a few seconds before doing the request [15:38:45] Peetz0r: Is this your own wiki (where something might be misconfigured), or a public wiki (where we can assume that everything is set up right)? [15:39:17] it's my own, but it's a default config (except for enabling image upload) [15:39:22] but I might have a clue [15:39:28] related to cookie handling [15:39:36] I might not send the cookies that I should be sending [15:39:39] lemme check [15:43:26] Peetz0r: So if something is wrong with cookies, or session cache, it could result in the token changing every request [15:43:46] Sometimes setting $wgSessionCacheType = CACHE_DB; can help things (at a mild performance cost) [15:44:07] so, I think I have now fixed my cookie handling. I am now at the exact same point as I was 2 hours ago [15:44:23] it is accepting my cookies and token (or at least, I think) [15:44:51] but it's responding with "Must supply a filekey when offset is non-zero" [15:45:20] but again, offset *is* zero, because the error happens at the first chunk already [15:45:29] https://paste.sigio.nl/view/356daced <= all the details [15:47:34] Unless this is a huge file, i would suggest just not using chunked upload [15:47:41] chunked upload just makes everything more fragile [15:51:24] Peetz0r: your offset field has a space in its name [15:52:42] foxlit: yes it does. [15:52:44] damn [15:52:54] I have been looking for a space for the past >2 hours [15:53:05] foxlit: thanks for having sharp eyes :D [17:00:33] so yeah, I removed that space and everything worked just fine with my 1.28 wiki [17:01:03] but it still gives me code: badtoken, info: Invalid token on my 1.26 wiki [18:50:21] Anyone particularly good with preloading text with an ? [20:00:06] JustBerry: What's your question? [20:00:51] Ivy: Erm, I'm trying to preload a using the parameters passed into the inputbox textbox. Is this possible? [20:08:25] Probably? [20:08:45] JustBerry: URL? [20:09:10] Ivy: Playing around with something that may be used for a WikiProject (potentially): https://en.wikipedia.org/wiki/User:JustBerry/EoTW_Nominations [20:10:33] So when someone clicks "New section", you want to control the text area? [20:12:26] JustBerry: ^ [20:25:50] Ivy: Well, I want to change that button to say something else. Regardless, I want to add something to add a template with a parameter that is what is inputted into that textbox at the bottom of the text area of that page. Hopefully, that made a bit of sense... [20:26:32] Regardless, I want the inputbox to add a template with a parameter that is precisely what is inputted into that textbox at the bottom of the text area of that page.* [20:42:02] Ivy: Oh, you're McBride. Hello! [23:48:46] Hi. [23:58:56] An empty "what links here" page seems to return status 404 - yet appear "all good" - this normal?