[00:41:58] Hey guys! I got a question that has stumped me all day. I have installed MediaWiki widgets installed, specifically Widget:iframe [00:42:39] I want to add some more parameters. That's the easy part. I want to check to see if they are empty and if so, do nothing. [00:43:29] Nothing I've done all day has worked. {{#tag:if| doesn't work, nor {{#if: [00:43:46] trying to use smarty doesn't work either [00:43:54] Would writing a Lua module do the trick? [00:50:13] isn't it {{#if:https://www.mediawiki.org/wiki/Help:Parser_functions_in_templates [00:50:15] ffs [00:50:15] https://www.mediawiki.org/wiki/Help:Parser_functions_in_templates [00:50:48] Yes, i looked at that page but when I try it doesn't parse [00:51:03] {{{foo|}} is probably some variant of what you're looking for [00:51:25] [00:51:49] if trackname is set, it's supposed to say yes not spit out the whole code [00:52:28] {{#tag:if|{{{trackname|}}}|yes|no}} [00:52:51] ok hold on [00:53:49] https://en.wikipedia.org/wiki/Help:Conditional_tables [00:53:55] {{#if:{{{variable_foo|}}} [00:53:55] |foo is set to '''{{{variable_foo}}}''' [00:53:56] |foo is ''blank''}} [00:54:16] it just spit all of it out in the html output, no parsing [00:54:31] Do you have parserfunctions installed? [00:54:50] I have 1.6.0 [00:58:48] bleught [00:58:51] not | : first [00:58:53] {{#tag:if:{{{trackname|}}}|yes|no}} [00:59:57] no difference [01:00:27] {{#if:{{{trackname|}}}|yes|no}} [01:00:43] https://test.wikipedia.org/wiki/Template:IRCHelpding [01:00:48] https://test.wikipedia.org/wiki/TestingHelpding [01:04:18] Now, if you put it inside a tag like it won't work [01:04:46] iframes suck [01:04:50] what if you put {{IRCHelpding|trackname=foobar}} instead and have it call a template? [01:05:06] they suck, i know lol [01:05:51] It's possibly because the xml tags get eaten at some point [01:05:58] Might need a includeonly/onlyinclude type thing [01:06:55] there's one around the iframe already? [01:07:13] see http://lactation.wiki/index.php?title=Widget:Iframe&action=edit [01:08:04] The idea is to add another parameter to that. if it's not empty, spit out additional text that piwik can pick up [01:10:02] i started with this: [01:10:08] {{#if:{{{trackname}}}| [01:10:09] data-track-content data-content-name="" data-content-piece="" [01:10:13] but it's not parsing [01:10:38] |}} at the end [01:34:13] Reedy: any ideas? i'm stumped [01:53:52] Reedy: I just hard coded it for now. It'll be a mandatory parameter. Thanks for your help! [05:50:26] Anyone know if it's possible to grab the number of bytes changed in the last revision from a PageContentSaveComplete hook? [05:50:35] I can't seem to find a way. [05:55:39] CitadelCore_: query the database for revision length and just subtract? [06:01:45] Alright, was hoping there was a direct property of one of the classes passed but I can cope with that. Thanks! [07:20:43] Hi :) I'm testing out VisualEditor (which seems nice) :) But how can I add line breaks in the VisualEditor? [11:49:00] can anyone say how actually documentation to mediawiki extnsions is generated? [12:04:43] rammanoj_: Depends. [12:04:50] Can you be more specific? [12:07:09] yeah! for almost all the extensions the documentation page is avialable through the link https://www.mediawiki.org/wiki/Extension:"name of extension" and how it got generated ? [12:07:36] How to edit such kind of documentations [12:17:23] rammanoj_, by manually writing it. [12:17:40] How to edit? By clicking "Edit" on that wiki page. [14:27:56] I have upgraded to a new mediawiki version. But now no images are rendered. Any idea? [15:10:19] hexmode: You around? [20:14:29] I've tried going from my 1.26.2 install right to 1.29, and when that didn't work, to 1.27.3.. but it just keeps crying about a bad magic word, or permission errors for any page... does 'protectionexpiry' ring any bells? [20:18:19] did you upgrade all the extensions? [20:18:46] the core ones, or 3rd party? [20:19:03] i guess you mean 3rd party [20:20:07] all of them, core and third party (if you updated using the tarballs, the extensions shipped with core are already up-to-date) [20:20:17] yeah, i updated via tarball [20:20:36] so i have to try to figure out how to check the others i copied over for new versions... [20:20:44] so ensure you update all of the other extensions [20:20:50] and ensure you ran the update.php maintenance script [20:20:57] yeah, did the update.php [20:24:32] ok.. updated one, no change [20:25:42] is your wiki public? [20:26:20] if so, do you mind providing a link to it? [20:26:43] it should be now [20:26:48] http://idlerpg.org/wiki/index.php/Main_Page [20:27:48] ok, so an extension is probably defining that work somewhere [20:27:51] when i remove protectionexpiry from includes/parser/CoreParserFunctions.php i just get permission errors for any page [20:28:20] oh that is a core [20:28:24] the protectionexpiry function is also defined in that file [20:28:48] did you extract the new tarball on top of the old files? [20:28:54] all my extensions are updated [20:29:00] nope, new tarball is fresh [20:29:05] k [20:29:11] i only copied over my LocalSettings, and extensions [20:29:24] may want to copy over images too ;) [20:29:38] i don't have any [20:29:45] and now downloads either [20:29:48] anyway, please do not edit the core files if you can avoid it [20:29:51] s/now/no/ [20:30:37] can you revert any changes to made to CoreParserFunctions? [20:31:07] it snuck in at this commit: https://phabricator.wikimedia.org/rMWa042808b919f3c41d00061e78281d35b897c9650 [20:31:49] yes, but that isn't an issue [20:32:01] in that I literally installed a 1.29 tarball yesterday and am not having any issues [20:32:24] well, it's having a problem with my 1.26.2 install/LocalSettings [20:32:28] most likely [20:32:43] can you publish your LocalSettings somewhere? Remove passwords, secret keys, etc. first [20:33:04] (where somewhere = a pastebin service such as gist) [20:33:17] i'm at least 60% certain that's where the problem will be, since it's been around since 1.0 or something [20:33:52] this might not be the place, but does anyone have experience setting up a mediawiki instance with the LDAPAuthentication plugin using the `$wgLDAPRequiredGroups` setting? i'm trying to point this to a LDAP group in my organization, and when i configure this setting to point to my LDAP group it crashes mediawiki and gives 500 errors [20:34:11] simple, lol - first elease was 1.1 :P [20:35:32] well, super old, maybe 1.7 or something [20:35:58] Skizzerz: https://dpaste.de/ecYc [20:37:36] maybe i should just start over with a fresh default LocalSettings.php [20:37:45] it's not like i have a lot of things to add/change in it anyway [20:42:07] I'd recommend that, yes [20:42:18] rename LocalSettings.php to something else, re-run the web installer [20:42:46] you should be safe to point it at the existing database (it'd go into update mode), but to be super safe either take a backup first or let it create a new dummy database that you then blow off [20:43:02] one last thing: how did you upload the new version? is there a chance that some files weren't updated/uploaded? [20:43:42] i just used wget to get the tarball, and untarred it in place, then renamed my /wiki/ to wiki.old, and renamed the new one to /wiki/ [20:44:05] hmm, that sounds safe [20:44:07] Skizzerz: this is a migration to a new server, so i have the 1.26.2 sql dump handy [20:44:22] the old server couldn't upgrade, since it was an older CentOS version [20:44:28] this server is Debian [20:44:28] usually it's people who use FTP to upload file by file have problems with this [20:44:38] yeah, FTP is just bad for overwriting crap [20:47:05] MaxSem: my hunch is that some of the requires are throwing things off [20:47:25] the only require i have added to that was for the googleAnalytics plugin [20:47:38] simple: in modern mw versions load skins via wfLoadSkin() and extensions via wfLoadExtension() instead of require_once, assuming the extension has migrated over to extension registration [20:47:49] ok [20:47:59] yeah, but the DefaultSettings.php require is gone now, and it should be wfLoadSkin( 'monobook' ) [20:48:17] hm, i have php-apcu installed, but the install isn't detecting it [20:49:32] DS required for the second time shouldn't break anything [20:53:18] i see i have some problems.. both php5 and php7.0 packages are installed, and it's using php5 [20:54:01] my php-apcu is for 7.0 [20:55:38] you'll need to config the webserver to use php 7 [20:56:00] 1.29 works just fine on it, and it's a lot more performant than php 5 :) [20:57:42] what should my project namespace be? [20:57:54] i don't see a setting for that in my old LocalSettings [20:58:13] the default is fine ("same as wiki name") [20:58:23] which in your case would be IdleWiki: [20:58:28] ok [20:59:57] simple, did you move the ./cache directory over? [21:00:07] no [21:00:10] goog [21:00:13] *good [21:04:59] ok.. seems to work, but i can't seem to log in now [21:05:16] it asked me a username/pass in the webconfig, but that seems to not work [21:05:35] oh.. typo, my bad [21:08:59] telling apache2 to use php7 instead of php5 wasn't that hard [21:11:06] how can i get to the config page again, so i can tell it to use apcu? [21:12:07] ah, mw-config [21:12:22] set $wgMainCacheType = CACHE_ACCEL; in your LocalSettings.php [21:12:31] that will make it use apcu [21:13:07] excellent, that's what i was looking for [21:13:36] i think this is all i needed [21:13:47] thanks for the help, Skizzerz [21:13:53] and MaxSem [21:13:57] :)