[01:07:54] hello! I need help understanding templates and how to format them [01:08:21] I am trying to write my own template akin to https://en.wikipedia.org/wiki/Template:Hatnote for my own wiki [01:08:35] but don't understand how to set variable [01:27:10] so I'm reading https://en.wikipedia.org/wiki/Help:Template and it looks like if I put my variable within {{{1}}} three braces, it will take input when writing {{template|input}} [01:27:34] however, how do I write it so that my input is automatically translated into an article link? [01:29:53] [[{{{1}}}]] [01:32:08] wow that easy huh. Ok. Now, what about copying the code that templates use directly from Wikipedia's templates? They don't really have template pages do they, since they're technically Lua modules? [01:33:11] Mostly it's a template that calls out to a lua module [01:33:14] !exporttemplates [01:33:14] To copy templates from Wikipedia, use Special:Export and check the "Include templates" option to get all the sub-templates, then upload the file with Special:Import on your wiki. You'll also likely have to install the ParserFunctions extension, Scribunto extension and install/enable HTML tidy. You also might need some CSS from Wikipedia's Common.css. You'll also need a lot of... [01:33:22] Nice that gets cut off [01:33:54] The "easy" way would be to install Scribunto too, and then just copy the Lua modules [01:54:45] any way you can link me to that bot text? [08:30:12] Hi everyone, I've started to get this error message when trying to view Special:UserLogin. Any idea what is happening? https://www.irccloud.com/pastebin/IItFwr0j/ [08:32:35] My version is 155e41c [08:47:25] Urbanecm: Some merge conflict or something? [08:47:29] The function is in the same file... [08:49:24] Reedy: the working directory is clear... [08:49:54] Weird op cache bug? [08:50:00] restart apache/webserver/cgi? [08:51:07] now it works :/. Thanks Reedy [08:57:28] heh [09:30:35] I have this condition in my template: ```{{{#iferror {{{link|}}} | value if true | value if false }}}``` and I am calling my template with the link param and without but I only see the "value if true" message does anybody know why ? [09:31:58] Possibly because of the | at the end of link? [09:34:52] well without it I still get the same result [09:36:03] iferror? [09:36:18] https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##iferror [09:36:39] I'm not sure why a link parameter would necessarily have an error? [09:37:45] Well I thought an empty parameter returns an error. I also tried out if but also got the same result. [09:38:05] * Well I thought an empty parameter returns an error. I also tried out ```if``` but also got the same result. [09:38:21] "This function takes an input string and returns one of two results; the function evaluates to true if the input string contains an HTML object with class="error"," [09:38:39] You can also use a parameter as the test string in your #if statement. You need to ensure you add the | (pipe symbol) after the name of the variable. [09:38:39] {{#if:{{{1|}}}|You entered text in variable 1|There is no text in variable 1 }} [09:44:36] Reedy: Nice that works ty so much. Another thing I would like to ask if I am trying to do something like this ```{{#if:{{{link|}}}|[|[[}}``` do I need to escape the "[" sign ? [09:48:02] What are you trying to do? [09:48:58] Well I am trying to either internally link a page or make an external link. [09:50:02] ```{{#if:{{{link|}}}|[|[[}} [09:50:03] {{{redirect|{{{name}}}}}}|{{{name}}}{{#if:{{{link|}}}|]|]]}}``` Code looks like that [09:50:18] * ``` [09:50:19] {{{redirect|{{{name}}}}}}|{{{name}}}{{#if:{{{link|}}}|]|]]}} [09:50:19] ``` Code looks like that [09:50:54] * ``` [09:50:54] {{{redirect|{{{name}}}}}}|{{{name}}}{{#if:{{{link|}}}|]|]]}} [09:50:55] ``` Code looks like that [09:51:05] * techfreak[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/KMYjCcuIjoynOIEbvMKLhNFc > [09:52:04] * techfreak[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/NAFDdyxzyHQFXfXNfjktEJux > [09:52:30] * techfreak[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/pKeTvrKxaimIycecLQduIHMn > [10:15:56] Mhm it does not want to work the question is why ```{{#if:{{{link|}}}| [ | [[ }} {{{link|}} {{#if:{{{link|}}}| ] | ]] }} ``` should work right ? [10:19:53] {{{link|}} [10:19:57] Missing trailing } ? [10:20:05] ```{{#if:{{{link|}}}| [ | [[ }} {{{link|}}} {{#if:{{{link|}}}| ] | ]] }} ``` [10:30:21] * techfreak[m] uploaded an image: image.png (118KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/ytnqFviIxViItHtDLFQVdKnD > [10:30:57] mhm for some reason the first if does not work [10:52:29] * techfreak[m] uploaded an image: image.png (13KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/trEeGfUmoudMNhRQOUiEAMWP > [10:53:24] I guess I need to escape the "[" somehow [10:53:54] MW doesn't really have escaping [10:54:18] It's usually just delaying usage of values with a layer of abstraction [10:54:41] like https://en.wikipedia.org/wiki/Template:! [10:57:37] Well so what I am trying to do is not possible with mw ? [10:58:08] I'd imagine it is, in some way [11:03:25] Reedy: Well ty for your help so far. I guess I am not the only one that had this issue so I will google a little bit and hopefully find a solution :) [11:30:36] Found a solution :) https://en.wikipedia.org/wiki/Template:Square_bracket_open [11:31:45] Basically the same as Template:! then [11:32:52] Well yes but the {{!(}} did not work that substitution worked [11:33:38] ! == | [11:33:38] Hello, I'm wm-bot. The database for this channel is published at http://wm-bot.wmflabs.org/db/%23mediawiki.htm More about WM-Bot: https://meta.wikimedia.org/wiki/wm-bot [12:05:33] Are there any icons available by that I can use without installing an icon pack like font awesome or uploading images ? [14:01:31] Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: @Lucas_WMDE & @James_F - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:51:26] Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @Lucas_WMDE & @duesen - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [18:54:10] Hi. I have an error when accessing my mediawiki installation. Is this the correct place to request assistance? [19:00:57] BrownKiwi61:--> This is supposed to be the right place but it may take a while to get an answer. I suggest you ask your question as best you can so that someone coming back to the channel can see the question and perhaps respond if they know the answer. [19:03:23] Ok...thank you. I have a new mediawiki installation. The installation went well without issue. Now, I'm getting an error related to a database query when the system is accessed. Specifically, "/wiki/ Wikimedia\Rdbms\DBQueryError from line 1457 of /home/xxxxxx/public_html/wiki/includes/libs/rdbms/database/Database.php" -- I have run the update.php [19:03:24] and it gives the same error. [19:04:46] Error: 1054 Unknown column 'ipb_reason' in 'field list' (localhost) [19:07:05] perhaps it is a bug in the updater, unsuccesful migration [19:07:18] what database are you using? [19:08:56] mySQL [19:09:29] I could manually add the missing row in the table, but not sure if that is the best approach... [19:12:52] I think it is saying you have an extra column [19:13:09] which version of mysql? [19:16:23] LoL...I'm not sure... [19:17:21] Looks like 5.6 [19:19:28] The table has a field "ipb_reason_id" (bigint20) but no "ipb_reason" [19:37:32] ipb_reason is removed in... 1.31? [19:38:59] Can you give us the full query? Or the full stack? [19:39:05] I'm suspecting an out of date extension? [19:47:49] Uploaded file: https://uploads.kiwiirc.com/files/5484c166f3c7b8980e9faebe170d692c/pasted.txt [19:48:14] The above is the full error stack [19:57:13] Doesn't look like this comes from an extension [19:58:22] BrownKiwi6112: it's a new MediaWiki installation? or an upgrade from a previous version? [19:58:40] Its an upgrade. [20:02:58] What version of MW? [20:05:31] looks like 1.31 [20:07:36] LocalSettings says 1.27.3 but I thought it was 1.31 [20:07:59] Why do you have a version in LocalSettings? o_0 [20:08:23] It's commented in there [20:08:37] check includes/DefaultSettings.php [20:08:42] # This file was automatically generated by the MediaWiki 1.27.3 [20:09:22] All that really tells you is what MW version created LocalSettings.php [20:10:31] According to defaultsettings.php it's 1.31 [20:10:50] Did you extract all files on a new and empty directory, or extracted them *over* the old files, overwriting files and potentially leaving old files behind? [20:11:01] 1.31.0? 1.31.1? 1.31.2? 1.31.3? 1.31.4? [20:12:27] The other possibility is the wrong comment migration setting... [20:13:18] I extracted them over [20:15:02] The code looks to be a line out [20:15:24] Your stack reckons 1195, but it's https://github.com/wikimedia/mediawiki/blame/REL1_32/includes/Block.php#L1196 [20:15:29] uh, that's the wrong version [20:16:53] Do you know how to use eval.php? [20:17:07] I have not used it [20:17:30] I think I will try a reinstall [20:30:58] BrownKiwi6112: please be sure to extract the new files on an empty directory. Doing that over the old one can cause weird errors like those, when old files are left behind [20:31:16] Yes, I'm going to do that now... [20:46:01] I restored the database with my wiki then I installed the new mediawiki. The installation overwrote the old database. I can restore it again, but shouldn't the installation preserve the old data? [20:55:21] BrownKiwi6112: It doesn't overwrite the database. Maybe it created a new one, or you defined a different table prefix than the old wiki [20:56:00] Ah, it may be the prefix... [20:58:00] In fact you can use the same LocalSettings from the old installation (just copy it to the new installation), and it will upgrade it in-place [20:58:55] hmm he left [22:38:30] Hi. Anyone familiar with installing bluespice on top of an existing mediawiki installation? [22:41:53] It would be BS3.1 on top of MW1.33.1