[00:47:34] dystant: is your wiki public? [04:39:51] hmm, why doesn't {{#tag:graph| }} work. I feel like I must be doing something stupid [04:52:19] got it, I was being stupid [04:53:11] :O [04:53:23] bawolff being stupid? unheard of [04:53:32] <3 [04:54:11] I had mismatched braces [05:10:30] hello, can anyone help me with defining magic words? [05:10:43] What's your question? [05:11:05] I can't get them to work... I'm not sure what I am doing wrong [05:11:27] $wgExtensionMessagesFiles['magic'] = __DIR__ . '/MagicWords.php'; [05:11:37] thats in my LocalSettings [05:12:06] $magicWords = array(); $magicWords['en'] = array('VHOST' => array(0, 'rewards.wiki')); [05:12:29] thats in MagicWords.php [05:12:39] In the same directory as LocalSettings.php [05:12:41] ? [05:12:44] yes [05:13:02] it's also readable [05:14:39] any idea? [05:15:33] Can you set $wgDevelopmentWarnings to true, just to see if there are any warnings [05:15:42] sure [05:17:01] where do they get displayed? [05:17:11] Generally with your php warnings [05:17:21] Also, what are you expecting your magic words to do? [05:17:37] {{MAGIC}} in a page gives me what I set it to in the file [05:18:27] oh [05:18:40] where do php warnings get displayed? I mean I don't see anything when I load the pages [05:19:08] You also need to hook into ParserGetVariableValueVarCache for static variables (what you're describing) or ParserGetVariableValueSwitch for dynamic variables [05:19:18] !hooks ParserGetVariableValueSwitch [05:19:18] Hooks allow you to run functions at various points in the main MediaWiki code. For more information about using hooks in MediaWiki, see . [05:19:31] err, wrong one [05:19:35] !hook ParserGetVariableValueVarCache [05:19:35] https://www.mediawiki.org/wiki/Manual:Hooks/ParserGetVariableValueVarCache [05:20:01] how come the magic words article doesn't say anything abou tthat? [05:20:20] is there an example you can show me? [05:20:45] Byan: Magic words are the backend part of wikitext constructs that can be translated. They are used for parser functions {{#foo:bar|baz}}, variables (what you're doing), image thumbnailing parameters, and also can be used manually [05:21:11] whoops, I thought that page had an example, guess not [05:22:49] !hook ParserGetVariableValueSwitch [05:22:49] https://www.mediawiki.org/wiki/Manual:Hooks/ParserGetVariableValueSwitch [05:23:17] Sort of has an example [05:23:40] So with what you said before (with the $magicWords['en'] = array('VHOST' => array(0, 'rewards.wiki')); part) [05:24:31] the format of that, is $magicWords[''] = array('internal name [what your code sees]' => array(, 'external name [what user types]')); [05:25:10] thats not what I expected o.O [05:25:22] whats the value? thats based on the hook? [05:25:33] yep, that's based on the hook [05:25:40] I think I got it [05:25:52] where do I set the hook? what file? [05:26:06] s/set/register/ [05:26:44] Normally you have a file named MyExtension.php which registers the hook. Often you'll have the hook function in the same file (Although if you're using a class, then people usually put the callback method in a different file) [05:27:41] hexmode: can I put it somewhere else just to test this? [05:28:00] what happens if I put it in LocalSettings? [05:28:15] For testing, its fine in LocalSettings.php [05:28:27] ok, lets see what happens.. [05:29:23] Also, I agree, our docs on this are rather confusing (although that describes most of our docs. Sorry :S ) [05:30:34] oh wait, in addition to be technically accurate, I think its also just wrong in a couple places [05:30:47] s/technically accurate/technically confusing [05:31:22] hrm, so which hook should I be using? [05:31:37] ParserGetVariableValueSwitch [05:31:53] not working hmmm [05:32:39] $magicWords['en'] = array('VHOST' => array(0, 'VHOST')); [05:33:29] case 'VHOST': $ret = 'My first variable'; break; [05:33:34] HMMM [05:34:03] you sure it'll work in LocalSettings just putting the function there like that? [05:34:28] yeah [05:34:57] The $magicWords part has to be in a separate file though [05:35:03] yep it is [05:35:31] but the hook and callback can be in LocalSettings (For example, on Wikipedia, there is a hook + callback in LocalSettings.php preventing anyone from deleting the Main_Page [05:35:53] and {{VHOST}} should be replaced in any page, right? [05:37:07] yes [05:37:20] Could you put your code in dpaste.de so I can see? [05:37:46] https://www.mediawiki.org/wiki/Manual:Variable [05:37:59] this is way better, let me check against it one sec [05:39:42] oh I forgot about MagicWordwgVariableIDs step [05:41:07] That's probably why its not working [05:42:07] yep it works now [05:42:09] thank you Betacommand [05:42:13] .. [05:42:17] bawolff: * [05:42:24] my tab complete was failing there [05:42:32] Byan: Also a good example is NumberOfWikis extension, which is a very simple variable extension [05:42:56] hey so I got a quick question. [05:43:08] what i want to do is have two vhosts that point to the same wiki, but use two different names [05:43:22] and different logo [05:43:26] whats the best way to do that? [05:44:54] bawolff: [05:45:43] Just don't include $wgServer in LocalSettings.php, and it should be auto-detected appropriately [05:46:02] You can use if statements in LocalSettings.php [05:46:30] how will that work with caching? [05:46:48] I guess I am not that worried about it right now, but in the future i could be [05:47:55] It will mostly work fine. It could pollute parser cache (e.g. {{SERVER}} might display the wrong value). You can use $wgRenderHashAppend to split the parser cache between the two sites [05:48:18] ok, thats helpful. [05:48:24] thanks for the help [05:48:30] I need to head to bed now :) [05:48:44] but otherwise, since the content is going to essentially be identical, most of the other caches should be fine [07:01:09] Hi, this is Valli... and am looking for help on for HPSA where we are finding issue to run scripts [07:03:44] when we are trying to run scripts through HPSA.. Start Job option is not activated to run script [07:04:08] do we need to do any modifications to fix this issue? [07:39:20] I'm not sure if this is the right channel, but I'm looking for Mediawiki admins who've had issues with spam on their third party wikis. [07:39:53] I was hoping to find a few real world cases to help with an extension I'm developing (for a GSoC project) that is meant to identify and delete spam. [07:41:07] polybuildr: I still don't see a community bonding evaluation task for your project. Did you create it? [07:42:05] Niharika: No, I haven't yet. Got caught up in picking the name for the project and requesting for it on Project-Creators and also requesting a Labs instance to act as a spam honeypot. [07:42:16] Niharika: Sorry, will get around to it in the next couple of hours. [07:42:33] polybuildr: Well, you must prioritise. Please do so. [07:55:31] polybuildr: That's probably all of them that have open editing [07:55:39] Not even recaptcha stops spam [07:56:07] bawolff: Hmm, I see. But anybody who has particular wikis that I should look at that have been "plagued by spam" or something of the sort? [07:56:16] Also, how does recaptcha not help? Human spammers? [07:56:45] I have no idea. All I know is recaptcha reduces but does not eliminate spam (From what I've heard) [08:07:57] bawolff: I see. Anybody who has had serious issues with spam on their wikis? [08:08:49] polybuildr: Also try talking to hexmode, he's in contact with a lot of people who run third party wikis [08:12:42] hexmode: Any help you can offer? [08:12:49] bawolff: thanks! [08:29:39] Anyone here familiar with BlueSpice? [08:30:31] I've installed it, it works - but I'm kinda wondering if it was worth the bother... if anyone does know much about it speak up - wouldn't mind discussing it in general (I've not got one specific question) [08:31:32] If you're not sure if an extension is worth it, it probably isn't (As a general rule) [08:42:21] How do I edit the contents of Special:UserLogin/signup ? [08:42:47] I need to add a notice/warning there. [08:48:24] okay, I think I'll need to edit the source by hand and not using the web interface. Am I missing anything here? [08:51:10] polybuildr: go to Special:UserLogin/signup?uselang=qqx all the things in brackets correspond to pages in the wiki starting with "MediaWiki:" [08:52:05] e.g. https://commons.wikimedia.org/w/index.php?title=Special:UserLogin/signup&uselang=qqx there's (signupstart), which means you can edit the page MediaWiki:Signupstart on the wiki to add stuff [08:55:45] bawolff: just curious, I guess uselang=qqx replaces the messages with their keys? [08:55:52] yep [08:56:34] thats some useful info [09:02:05] Its honestly the most useful new mediawiki feature in the last 5 years [09:02:11] Life was a PITA before it [10:11:54] Hi everyone. Can someone help me? I want to use mediawiki API for receiving some information about term I am looking for (for example get definition of some words). How can I get this information? [10:18:03] generak13: there is no easy way to get only parts of a wiki page. Especially if the page contains infoboxes and other templates, you'd need to do quite a bit of stripping. [10:18:12] you could try to get the information you want from wikidata.org though [10:18:37] structured data is a lot easier to process than free text. but then, there are no natural language definitions or explanatiosn there. [10:19:44] generak13: generally, the api doesn't help you much with free text content. it's build for accessing and using meta-data, like getting the timestamps of all revisions of a page, or listing the pages in a category [10:20:58] so I cann't get info in some structured type like json? only all textual content that exists on the page? [10:23:46] generak13: depends on the kind of "info" you want. there is currently no structured way to get definitions. [10:24:12] you can get first or second paragraph or so [10:24:12] there *is* a structured way to get the birthdate of people. [10:24:17] not from wikipedia, but from wikidata [10:24:23] shameless plug? :) [10:24:37] yea, absolutely shameless :) [10:24:51] saper: first paragraph would be good without all the tremplate cruft. [10:25:12] I think Java bot framework does quite a good stuff to parse wikitext [10:25:32] bah, asker timed out. [10:25:58] saper: yea, all hacks and ductape though. [10:26:30] that's life [10:26:43] somehow I prefer that to the sterile world of wikidata :) [10:27:04] by the way how are you going to represent inter-object relationships in wikidata? [13:16:29] legoktm: Hi, you had replied to my issue about extension registration [13:16:38] any ideas what i can test to figure out what's going wrong? [13:31:12] hi [13:31:25] there something which migt be a possible bug report to UploadWizzard: https://commons.wikimedia.org/wiki/Commons:Hospoda_U_Commons#Problem_with_uploading_a_picture [15:59:11] hi @ all, has anyone used kiwix with the wikimedia api? does anyone know if my local kiwix webserver has a mediawiki api endpoint? [16:04:14] UserProd: hi, still around? [16:16:20] legoktm: yessir [16:17:07] UserProd: let me look at what you posted on the wiki... [16:17:31] i put up my localsettings.php [16:18:11] thnx [16:18:12] UserProd: all of your skins are working fine with wfLoadSkin? [16:18:37] yep [16:19:41] and the extensions that aren't working, they're actually not being installed right? or are they just not showing up in Special:Version? [16:20:25] they're not showing up in special:version, and they're not active [16:20:35] ok [16:21:05] UserProd: where you put your LcoalSettings.php? [16:21:07] do you have APC installed? what PHP version are you using? is this a public wiki I can look at? [16:21:16] FlorianSW: he linked it on-wiki: https://www.mediawiki.org/wiki/Manual_talk:Extension_registration [16:21:24] it's semiprivate [16:21:35] ahh, you edited your post, haven't seen that :) [16:21:37] that's fine then [16:21:43] it's public but i'll send you guys the link in pm [16:22:55] i see CharInsert in Special:Version [16:23:18] hmm, but not the other ones, like you said :/ [16:23:30] right now it's in the original backwards compatible mode [16:23:40] so everythign is added via requireonce [16:23:44] UserProd: are warnings/debugging enabled? [16:24:00] UserProd: and notices probably, too? [16:24:22] i have $wgDebugLogFile = "/tmp/debug.log"; [16:24:28] do i need to do anythigng else? [16:24:52] https://www.mediawiki.org/wiki/Manual:How_to_debug#PHP_errors [16:26:34] ok, turned on debugging through htaccess [16:28:09] UserProd: is there anything in your debug.log? [16:28:47] PHP Warning: Creating default object from empty value in /...LocalSettings.beta.php on line 282 [16:28:52] that's for the graphviz config [16:30:13] hmm [16:30:45] I'm trying to create a page whose title starts with a lowercase letter. [16:30:56] I put $wgCaptialLinks = false; in LocalSEttigns.php [16:30:58] UserProd: you have shell access right? can you open up eval.php and run "var_dump(ExtensionRegistry::getInstance())" ? [16:31:08] But it's still forcing uppercase. [16:31:24] like, php eval.php? [16:31:27] UserProd: yes [16:31:37] Any ideas? [16:31:45] yrocsy: did you spell it correctly? https://www.mediawiki.org/wiki/Manual:$wgCapitalLinks [16:32:27] legoktm: what should i look for? [16:33:04] UserProd: can you pastebin the output somewhere? it'll include a few filenames and what extensions the system thinks it loaded [16:33:22] legoktm: Well that was embarrassing :$ [16:33:39] Thanks. [16:34:18] sent in pm [16:34:19] :) [16:35:01] UserProd: but the extensions exist, right? It seems, Nuke and CharInsert are loaded correctly [16:35:23] i think i'm on the previous version of CharInsert [16:35:32] UserProd: hmm, that wasn't as useful as I had hoped :/ [16:35:41] hmm, yes, it should throw an error otherwise [16:37:30] UserProd: do you have APC installed? [16:37:59] i might have memcached [16:38:35] don't remember about apc [16:38:44] how can i check? [16:38:54] phpinfo(); should work [16:40:07] APC support => Emulated [16:40:33] APCu Support => disabled [16:41:37] ok, once we figure this out I'd recommend installing it, but for now it's one less thing to debug [16:41:45] :D [16:41:55] doesn't memcached take its place? [16:42:56] UserProd: I'm wondering what happens, if you change the order and put Nuke directly after CharInsert? or load the extensions manually with wfLoadExtension(); [16:43:45] the table in the discussion, i turned everything else off [16:43:48] only tested with two [16:44:19] that's weird [16:44:26] very :) [16:44:47] surprised there's something so specific to my environment that it would break this very specific feature [16:45:05] UserProd: wait, why is Cite enabled and Gadgets not in your 3rd example in your table? [16:45:23] the first one only shows up [16:45:25] ah, no, forget it, it's just a wrapper to wfExtension... [16:46:54] UserProd: my guess is that an extension somewhere is messing with something. [16:47:20] legoktm: but i've tried it with only two extensions at a time [16:47:32] and i tried a few combinations, not only gadgets and cite [16:47:46] UserProd: but did you keep all of your other extensions + skins installed too? [16:47:55] skins yes, extensions no [16:48:09] hmmm, let me try disabling all the skins except vector [16:49:50] ok, everything disabled except vector [16:50:02] extensions too? [16:50:05] wfLoadSkin( 'Vector' ); [16:50:08] yes [16:50:14] wfLoadExtensions( array( 'Cite', 'Gadgets' ) ); [16:50:22] those are the only two registrations [16:51:13] and Gadgets isn't showing up :/ [16:51:23] i tested it locally with Vector, Gather, Cite and Gadgets, without any problem (but all on master) [16:51:52] UserProd: all REL1_25 right? [16:52:10] yea [16:54:42] UserProd: try this in your localsettings: [16:54:43] wfLoadExtension('Cite'); [16:54:43] wfLoadExtension('Gadgets'); [16:54:44] ExtensionRegistry::getInstance()->loadFromQueue(); [16:55:29] done [16:55:47] still the same :( [16:55:50] wtff [16:56:29] tell me about it :P [16:57:15] I'm setting up 1.25 locally to try and reproduce [16:57:42] ty [16:57:59] let me update to the latest code on REL1_25 for everything [16:58:03] just so we're on the same codebase [16:58:34] <^d> legoktm: speaking of such things, https://phabricator.wikimedia.org/T98956 [16:58:42] UserProd: "$IP/../../configs/db-configs.beta.php" only contains the database variables, yes? [16:58:54] yep [16:59:08] ^d: yes, I'm also looking into that one at the same time >.< [16:59:15] <^d> Ah ok, thx [16:59:35] ^d: I'm confused as to how the $wgMessageDirs['Nostalgia'] is set properly, but the skin isn't loaded. [16:59:36] $wgDB* variables only [16:59:57] <^d> legoktm: Yep, Krenair and I were wondering the same thing [17:00:09] <^d> He was able to force it to load in eval.php [17:00:11] maybe Cache related (don't know how that can happen), but UserProd uses Squid/Varnish (at least you activated it in your config) and wmf does it too :? [17:00:36] but it's a frontend cache, so it shouldn't affect the creation of a page :( [17:00:43] special:version is uncached [17:01:06] legoktm: and it shouldn't throw an error like on nostalgia wiki [17:01:07] legoktm, ^d : I suspect the MessagesDirs thing is a peculiarity in our i18n system [17:01:31] the fallback skin also disables frontend cache so.. [17:02:46] ^d, it shows up in wgValidSkinNames if you wfLoadSkin( 'Nostalgia' ); ExtensionRegistry::getInstance()->loadFromQueue(); [17:02:50] (from #wikimedia-operations earlier) [17:03:08] that's the eval.php trick I was talking about [17:03:24] <^d> Maybe we're adding nostalgia too late? [17:03:26] it's not stuck in the queue though [17:03:37] lively today:-) [17:03:51] I var_dump'd ExtensionRegistry::loadFromQueue() and the internal queue was empty [17:04:27] ^d, well vector works somehow [17:04:46] <^d> It's included like 400 lines up [17:05:07] I don't think we do anything particularly weird with extension registration in the gap between them [17:05:18] <^d> Yeah I don't think so [17:05:30] UserProd: okay so......I switched my VM to REL1_25, same with Cite, Vector, Gadgets, and all 3 are loaded :| [17:05:40] 471 vs. 868 [17:05:52] yea, so somethign has to be messed specific to my environment [17:07:04] <^d> All other skins (cologneblue, vector, monobook) all work on nostalgiawiki just fine [17:07:11] <^d> So it's just that skin [17:07:59] should we try moving it up and see what happens? [17:08:49] <^d> Can't hurt [17:29:18] I'm using templates. I have a situation where one templates includes another. However, the headings in that case are subjective, ie in this case they need to be === foo === instead of == foo ==. Any way to deal with that? [17:31:55] legoktm: FlorianSW: I deleted the mediawiki install and uploaded a fresh copy, and it seems to have fixed the issue :| [17:32:16] it must have been a legacy file that was lying around causing issues... [17:32:20] sorry for wasting your time :( [17:32:39] :( [17:33:12] doug3: hmm passing === or == as the parameter? [17:33:24] Would this be the right place to ask about Echo? [17:34:19] this is my issue... http://www.mediawiki.org/wiki/Extension_talk:Labeled_Section_Transclusion#shortcut_for_simple_transclusions_on_paragraph_level [17:34:28] saper: pass headings as parameters? euw [17:36:28] UserProd: hmm, that would explain, why our setups all working. Had you updated your wiki or strated from 0? [17:37:19] I generally update in place, but wipe out the config every few months [17:37:49] especially when there are major releases [17:39:49] soeb: it would [17:39:50] !ask [17:39:50] Please feel free to ask your question: if anybody who knows the answer is around, they will surely reply. Don't ask for help or for attention before actually asking your question, that's just a waste of time – both yours and everybody else's. :) [17:40:31] soeb: you might also want to ask on #wikimedia-collaboration if no one knows the answer here, that's where Echo's developers lurk [17:41:03] MatmaRex: Thanks! We upgraded from 1.23 recently, and the Echo overlay seems to have broke somehow - the Preferences button doesn't show up and it's now as tall as the browser window [17:41:31] Will do if that's the case, I was wondering if there was a special channel for it [17:42:18] Sigh. Is there any way to make template variables evaulate inside code blocks>? [17:42:28] FlorianSW: thanks for your help with debugging this though! [17:42:42] legoktm: thanks for your help as well! [17:43:12] UserProd: yaaaaaaaaay! [17:43:32] soeb: first of all make sure you're using the same version of the extension as of MediaWiki. so if you upgraded to, say, MW 1.25, also upgrade Echo to whichever version is marked as compatible with MW 1.25 [17:43:41] Yup, both are on the REL1_25 branch [17:44:35] is your wiki public? if not, can you share a screenshot? [17:45:26] Provided you have an account on PCGW, you should be able to see it (we're testing the upgrade on a separate install that requires login) [17:45:35] http://dev.pcgamingwiki.com/wiki/Home [17:46:58] Sigh. Is there any way to make template variables evaulate inside code blocks>? [17:47:02] UserProd: so you upload the new files "over" the old ones? You shouldn't do that (like you see :P), maybe this one helps you: http://mediawiki.org/wiki/Upgrade [17:47:26] i actually let my VCS usually take care of the changes [17:47:42] it's supposed to delete/add the right files [17:48:09] guess it chokes now and then with the major upgrades due to the number of files that change/move/delete [17:48:14] soeb: hmm. i would guess it might be some incompatibility with the "compact personal bar" you're also using [17:50:06] MatmaRex: Ah, true, seems the Preferences button shows up when I switch to normal Vector [17:50:28] But the style still seems to load weirdly, wrt height and placement [17:51:02] {{{variable}}} <--- sadness [17:59:11] UserProd: the one issue I could see is that you had CACHE_ACCEL set up, but APCu was disabled so it couldn't actually cache anything [17:59:46] Skizzerz: yea, i think i need to switch that to memcached now [18:00:23] although that'd be an odd way to manifest as an issue, where some exts work and others don't [18:01:58] Is there any way to make template variables evaulate inside code blocks>? [18:15:20] Skizzerz: the extension registry hardcodes APC if it's enabled and otherwise just uses an EmptyBagOStuff [18:36:40] Is there any way to make template variables evaulate inside code blocks>? [18:55:20] eranroz : around? [20:09:35] Is there any way to make template variables evaulate inside code blocks>? [20:10:41] by code blocks do you mean
?
[20:21:23] 	 Vulpix: Yah, or 
[20:21:56] 	 That's not possible
[20:22:53] 	 Actually, it is... >fab -R {{{component}}}.$env chef_client.report -I>
[20:23:07] 	 but it inserts an extra line break before, which looks crappy
[20:23:32] 	 ... and if not possible it sorta makes templates useless.
[20:24:47] 	 well, if 
 evaluates templates then it will be pretty much useless, because the common use of 
 is to put code that most of the time has side effects on wiki code if would be interpreted as such
[20:25:37] 	 Vulpix: it works. my question maybe should be how do I remove the extra whitespace before that this hack introduces
[20:28:44] 	 i guess I'll take functionality over ugliness.