[01:11:06] with a template, I would like to retrieve the name of the current user who's viewing a page. I'm looking for the same name I get from REVISIONUSER but valid for the person currently viewing the page. Is there any way to get this? [01:28:16] emacer: no, there's not [01:28:38] and there can't be one, since mediawiki builds a page once, then gives it to multiple people. it doesn't rebuild it all every time [01:48:59] jackmcbarn, gah, I was afraid of that. Thanks! [01:49:52] emacer: depending on exactly what you wanted to do, there may be a way to do it though [01:49:57] emacer: what did you want to do exactly? [02:00:04] emacer: you could try the old WhosOnline and make a best guess based on page history [02:13:01] did the browsertests role disappear from the mediawiki-vagrant VM? [02:14:01] wmat: Yes. The tests have been moved into the individual extensions rather than being in a separate repo [02:15:08] bd808: ok, thanks [02:16:07] The extensions that have browser tests (eg VisualEditor) should be setup to run them just by installing the MW-V role for the extension [02:16:48] Note that MW-V == MediaWiki-Vagrant !== MediaWiki-VisualEditor == MW-VE. Because we're confusing. :-) [02:16:57] There is some magic "look for browser tests" code that sets that up now as I recall [02:18:01] James_F: heh. I work for mediawiki-core, not to be confused with core-features at the Wikimedia Foundation on the MediaWiki product that powers Wikipedia. ;) [02:18:09] bd808: :-D [02:24:49] jackmcbarn, sorry, didn't see your message until now. [02:26:24] jackmcbarn, I'm creating a template, and I want to use #ifeq to check the current user and automatically substitute their initials into an example of what to cut and paste to use the template. Their initials are used by the TODO extension we use to track who's promised to write what content, and I'm trying to create a template which fills in a bunch of metadata automatically for them, including their initials, to make it much easier to use. [02:26:49] emacer: you can make your example output include the text {{subst:REVISIONUSER}}. when they hit save, that will turn into their username [02:27:03] you can also pass that into a template you subst to turn it into initials [02:27:17] jackmcbarn, yeah, I can't, because this is on the description page for the template, so they would have to edit it just to change it to their initials [02:27:34] I'm already using REVISIONUSER, and tried that initially for this [02:27:41] it didn't work [02:27:50] emacer: make the output they cut and paste include the subst at that level [02:27:55] then when they cut and paste it, it'll fix it [02:28:14] jackmcbarn, I would, but it's really messy (lots of {{{ and }}}) [02:28:20] OH [02:28:21] I know [02:28:26] a level of indirection [02:28:30] emacer: yes, sort of [02:28:33] is your wiki public, btw? [02:28:40] I can write a template to do that, and just call that template from the text to cp and paste [02:28:47] the released version is [02:29:06] we have two wiki servers: one for developing the content, and one we deploy to for the public to see [02:29:19] can you pastebin the template code you have somewhere? [02:29:31] for what? [02:30:09] so i can see exactly what's going on to make sure the subst fix will work the way it should [02:30:19] (or if you're confident you know how to do it, you don't have to) [02:30:25] I think it will. I've used it a decent amount [02:42:13] jackmcbarn, okay, I have it substituting the contents of the template now, but I want it to substitute the results of the template in instead. [02:46:22] jackmcbarn, https://dpaste.de/5Cyh [02:46:49] jackmcbarn, any idea how to make it substitute the extra level? [02:46:56] emacer: i'm working on it [02:47:02] thx [02:48:08] emacer: {{safesubst:#switch:{{REVISIONUSER}}|Mdean=MD|Mwelling=MW|Kyoungmeyer=KY|Bserrano=BS|Mgloff=MG|ME}} [02:48:23] emacer: btw, is the pattern always just the first two characters of the username, converted to uppercase? [02:48:26] oh wow, that's so much simpler! [02:48:35] if so, i can give you logic for that, that doesn't require hardcoding everyone [02:48:35] yeah [02:48:40] sweet! [02:48:49] emacer: do you use the Scribunto extension? [02:49:01] no, I'm pretty sure it's not installed [02:50:43] hmm, that gave me the wrong initials [02:50:56] it gave me the default, ME [02:51:14] emacer: {{safesubst:uc:{{safesubst:padleft:|2|{{safesubst:REVISIONUSER}}}}}} [02:51:17] try that [02:51:40] oh, i forgot something in the first one i gave you. doesn't really matter; the new one's better anyway [02:52:19] AWESOME!!!! [02:52:21] You ROCK!!! [02:52:24] THANK YOU!! [02:52:31] you're welcome! [02:52:45] what's that trick called, so I can learn it? [02:53:34] wait, I think I'm starting to see how it works [02:53:37] there's a lot of tricks there [02:53:41] yeah [02:53:42] safesubst is the one that makes it subst the inside [02:53:47] uc just makes things uppercase [02:53:55] I figured that's what uc was for [02:53:56] padleft lets you do things with certain numbers of characters [02:54:04] ah [02:54:08] weird name for that [02:54:42] well, it's really for padding. see https://www.mediawiki.org/wiki/Help:Magic_words#Formatting for more about it [02:54:56] okay, awesome, thank you! [02:55:03] and https://www.mediawiki.org/wiki/Manual:Substitution talks about safesubst [02:55:18] sweet, that page is completely new to me [02:56:08] that'll keep me busy for a while :) heheh [08:36:20] Recommended best reading on constructor vs. object factory? https://gerrit.wikimedia.org/r/#/c/174330/ [10:34:32] Hi, how do I need to encode non ASCII values for the MIME headers? When I upload something in stashed mode, the 'chunk' block apparently needs a 'filename' value in the header. [10:35:53] There is RFC2231 but if the header looks like that: 'Content-disposition: form-data; filename*=utf8''%C3%9C.jpg; name="chunk" ' I get: [10:35:53] �badupload_chunk: File upload param chunk is not a file upload; be sure to use multipart/form-data for your POST and include a filename in the Content-Disposition header.� [10:36:41] This error also is returned if filename is missing [13:37:20] I've set up mediawiki, but when others go in the the website locally the site looks very strange, only text and no pictures and the text is to the left side of the site. But when logging into the wiki from the same machine then it shows as it should and all [13:37:49] what does the webserver log say? [13:40:26] andre__: is it inside the /var/www/log? [13:40:36] depends on your system [13:40:41] andre__ I mean /var/log/apache2 [13:40:47] it's a linux mint [14:11:02] hey all. Needing to manually reset a user password. When I use the changePassword.php script, it tells me it cannot connect to the DB [14:18:50] Vladimirski: you have installed the skins ? [14:19:29] I worked out [14:19:42] it was all in the LocalSettings.php file=) [14:19:49] just changed to the Ip address from "localhost" in $wgServer [14:19:51] tonythomas: [14:20:31] Vladimirski: okey :) [14:20:37] thanks man [15:26:18] hey all. Needing to manually reset a user password. When I use the changePassword.php script, it tells me it cannot connect to the DB [15:33:05] Rewt`: Presumably your wiki can still access the DB though? Can you try making an edit or something? [15:45:09] yeah, it's fine. db is up and running and all [15:46:05] and that special passord reset page doesnt' seem to be valid for me. [15:46:20] have stepped away from the office so don't have the url in front of me. [15:52:31] I'm getting this error when trying to save Module:Documentation [15:52:34] Script error: Lua error: Cannot create process: proc_open(/dev/null): failed to open stream: Operation not permitted [15:52:55] should I add /dev/ to php.ini's open_basedir? [16:04:55] hi [16:06:01] probably i'm doing something wrong, someone can explain me why RequestContext::getMain()->getTitle() returns null ? [16:06:24] Hi there gecco [16:06:54] yep, it's a open_basedir restriction based on the errors [16:07:06] hi :) [16:07:06] looks like it's because of graphviz [16:07:44] gecco: What version of mw are you using? [16:08:05] gecco: It looks like the latest code falls back to $wgTitle, which *should* work... [16:08:38] 1.23.6 [16:08:44] Hm. [16:08:49] That sounds recent enough to work [16:09:01] gecco: What page are you loading when that happens? [16:09:22] in alla pages, seems [16:09:47] ...huh [16:09:48] Weird [16:09:48] i'm trying to print it at localsettings bottom [16:10:06] gecco: Can you also try to print $wgTitle? [16:11:32] empty [16:11:48] Hrm [16:11:49] i was trying to get getNamespace() [16:12:57] with print_r(RequestContext::getMain()); i get RequestContext Object ( [request:RequestContext:private] => [title:RequestContext:private] => [wikipage:RequestContext:private] => [output:RequestContext:private] => [user:RequestContext:private] => [lang:RequestContext:private] => [skin:RequestContext:private] => [config:RequestContext:private] => ) [16:13:39] gecco: Maybe LS is getting loaded too early for some reason [16:13:50] It shouldn't be though [16:13:52] No, never mind [16:14:20] * marktraceur clearly has no idea [16:14:32] googling i found https://www.mediawiki.org/wiki/Extension_talk:UserFunctions#Call_to_a_member_function_getNamespace.28.29_on_a_non-object_in_UserFunctions.php:69_39834 [16:15:13] but didn't make sense to me [16:17:38] also: http://www.gossamer-threads.com/lists/wiki/mediawiki-cvs/421491 [16:21:38] is there any alternative way to get NS in localsettings? [16:26:22] seems like I fixed my errors [16:26:53] it seemed to be a combination of incorrect images directory permissions and PHP open_basedir restrictions [18:12:16] Hello Nemo_bis [18:12:34] Thank you for inviting me to translatewiki.net [19:06:49] ok [19:06:56] I'm having a Lua problem [19:07:19] I'm getting a big "Script error" when I try to use Module:Documentation from wikipedia which I imported into my own iwki [19:07:31] Nahiyan: Click on the script error to see more info [19:07:42] oh [19:07:48] It wasn't clickable in the rpeview [19:07:50] prewview [19:07:54] Huh. [19:07:55] ... preview [19:08:03] Lua error: Cannot create process: proc_open(/path/to/file.log): failed to open stream: No such file or directory [19:08:05] fu [19:08:05] vweierp [19:08:07] not again [19:08:22] now... grepping localsettings.php [19:08:27] Nahiyan: You need to replace /path/to/ in *every* configuration example with a sane path [19:08:39] ah [19:08:42] guess what [19:08:55] this is how I enabled logging [19:08:57] $wgScribuntoEngineConf['luastandalone']['errorFile'] = '/path/to/file.log'; [19:09:16] ⇎_⇎ [19:09:18] gj [19:09:30] that's hilariously stupid [19:09:33] * marktraceur hands Nahiyan a ribbon: http://marktraceur.info/shared/images/funny/you-tried.png [19:09:58] ah [19:10:03] found the other error [19:10:11] Module:Message_box/config doesn't exist [19:10:14] forgot to create that one [19:10:44] ty [19:11:50] let's see if this works [19:12:07] I'm trying to copy the templates and use Template:Documentation to proved the docs from wikipedia [19:12:13] using interwiki transclusion [19:14:42] I thought it was to good way to reduce copying [19:14:49] a good way* [19:15:26] oh [19:16:01] marktraceur, do you have an account in a bugtracker used by scribunto? It might be nice to report that "Script error" can't be clicked in a preview [19:17:56] Nahiyan: You can sign up for one! [19:18:03] Nahiyan: https://bugzilla.wikimedia.org [19:18:43] dear gosh [19:18:46] I have so many accounts [19:20:24] Heh [19:20:44] Nahiyan: Funny enough, if you want to report a bug next week, you'll need to get *yet another one*! [19:20:52] (we're migrating to a different bug tracker this weekend) [19:21:31] wow :p [19:22:01] Just bad timing :) [19:23:04] well I'm not finding any related bugs... [19:23:09] File away! [19:28:27] woo [19:28:42] wait [19:28:58] I can't tell if this may be part of some general bug affecting all extensions [19:29:19] Nahiyan: I don't think so [19:32:18] okay then [19:35:24] okay... so under MediaWiki extensions? [19:35:46] oh yeah, looks like it [19:35:48] Nahiyan: Yes, and component LScribunto [19:35:52] Scribunto* [19:36:06] hmm [19:36:30] what should the severity be? It doesn't affect anything badly, but an inconvenience to the editor [19:36:44] Probably normal [19:37:16] k [19:37:41] should I specify OS and hardware if it's not relevant? [19:38:47] hmm I guess I will [19:39:28] Yeah, you may as well [19:39:41] ok [19:51:15] ok [19:51:18] done [19:51:23] Yay! [19:51:24] and it only took 20 minutes [19:51:29] https://bugzilla.wikimedia.org/show_bug.cgi?id=73618 [19:51:34] Heh, sorry about that Nahiyan [19:52:26] it was my slow working though :p [19:53:18] holy crap 3623 open bugs [19:53:45] huge backlog [19:55:33] well, thanks marktraceur! [19:55:45] Is that all? :P [19:56:35] I guess! [19:56:49] I'm thinking on whether to forego ambox, etc. for just mbox [19:56:54] I mean, only 3623 bugs [19:57:04] xP [19:57:10] pfft, not much [19:57:21] just a couple [19:57:26] nothing to worry about [20:06:54] oh [20:07:08] in https://phabricator.wikimedia.org/maniphest/ [20:07:23] the list looks nicer to me without border-radius [20:09:11] giving a margin-bottom or top of -1 looks nice too [20:12:38] You're welcome alisha_, sorry for the incorrect rejection earlier ;) [20:15:03] Ah, this is a funny comment: "Oddly, the Template:ShouldBeSVG page was using a PNG when an SVG would do just fine. I complained, then decided to fix the thing" [20:16:33] heh [20:19:53] Nemo_bis: its okay [20:20:12] But now I want to start my work asap [20:20:55] So please point me to some micro-tasks