[14:21:22] hey, we have a ancient mediawiki we never updated and now reaally have to [14:21:41] some ppl are thinking we need to upgrade from $ancient to -every- version between to migrate? [14:21:59] cant we just export all pages as xml , setup new mediawiki and all plugins we used/want , import xml ? [14:22:06] would that be a better path? recommended? [14:23:07] does anyone here use mediawiki? :P [14:23:54] You're in the right place; just be patient and someone will be able to answer your question eventually :) [14:24:30] buZz: How old are we talking? [14:24:41] But no, you shouldn't have to go through every individual version [14:24:54] ~10 years old [14:25:04] What version? [14:25:04] wow [14:25:06] MW 1.12? [14:25:11] 1.16? [14:25:24] 1.23.2 [14:25:34] with heavy leaning on SMW [14:25:44] (SMW 2.2.2) [14:25:51] 1.23 was supported until early 2017 [14:26:01] oh all good then [14:26:01] :D [14:26:02] So not "too" bad [14:26:27] Reedy: but, you're saying, even that 1.23.2 setup with SMW, we should just do 'export xml' 'setup new' 'import xml' upgrading? [14:26:39] thats the mediawiki way? :) [14:26:40] No [14:26:47] we shouldnt? [14:26:54] but you said 15:24:41 < Reedy> But no, you shouldn't have to go through every individual version [14:27:14] MW supports upgrades between many versions [14:27:23] Only "recently" have we started curtailing that [14:27:36] i'm not talking about upgrading the install as-is [14:27:47] I'm literally meaning you don't need to go through 1.24, 1.25, 1.26... all the way to 1.35 (or newer) [14:27:50] i'm talking about setup a -new- wiki and importing the data to it [14:27:58] we wont be upgrading the wiki in place, ever [14:28:21] setup new box -> install whats needed -> do upgrade on it -> test -> if success deploy inplace of actual wiki setup [14:29:04] or are you trying to say the xml export from 1.23 wont be able to be read by current mediawiki? [14:29:18] I'm not saying that [14:29:25] It should potentially be fine [14:29:34] alright, so thats the path then , thanks [14:29:43] Not necessarily [14:29:45] But I have no idea how the SMW stuff will play with imports [14:29:51] And if you've got uploads, you'll need to handle those [14:30:27] I would be tempted to just stage a more up to date MW version (extensions etc), import the database, run the updater, and see whats what [14:31:00] import the db inplace you mean? without mediawiki's import tools? [14:31:04] Yeah [14:31:14] You'll also lose user accounts with the XML method [14:31:32] we have no user accounts in the wiki [14:31:49] o_0 [14:31:58] (no its not zero auth, we use SAML atm but moving towards OIDC) [14:32:14] There's still user accounts on the wiki [14:32:25] oh thats fine, they just dont matter [14:32:25] With a reference to the external account by your auth plugin/provider [14:33:12] right, users on auth end didnt change, sounds totally fine [14:37:48] yeah i checked, all entries in 'users' are just there from their first login :P so should -likely- get autofilled [14:55:47] Hi there. I'm a newb, trying to build a custom wiki solution. I have some basic questions I cannot find the answers to in the docs. I hope it's the right channel. Question one: if I have a page generated with a template, can I let users to customize the page using template parameters? How do they address them on the page? E.g. I have a template [14:55:47] called Company with a parameter 'Company Name' that generates a page let's say for Google. When I edit source of that generated page, how do I add a customized message "My notes about {{{Company Name}}}"? [15:01:55] 1) yes, 2) click 'edit with form' 3) by editting the page [15:02:14] whats {{{}}}} ? is that some mediawiki syntax i dont know about? [15:03:14] https://www.mediawiki.org/wiki/Help:Templates#Named_parameters [15:03:43] ah fancy , might postdate our setup ;) [15:03:58] Pretty sure it's much older [15:06:56] Thanks Reedy. I read that doc but still don't get it. It helps me to call the template with the parameters. As in {{Company|Company Name=Google}}. But on the rendered page, how do I reference the value (Google) that was used to generate the page? [15:07:12] You can't [15:07:24] You can use the parameter in the rendered output from the template call [15:08:53] How? [15:09:27] In your template code (ie on the Template: page) you can use {{{Company Name}}} [15:09:52] Oh, yes, that's what I'm doing. Thank you. [15:15:43] My next question: I'm trying to calculate mod in the template to introduce some variety to generated text. I tried: {{#expr:{{{Year Founded}}} mod 3}} but getting an Expression error: Unrecognized punctuation character "{". Do you know why? [15:17:30] When you use it on a page? Or when you view the Template page? [15:18:36] when I view the Template page [15:19:02] That sounds expected, as it won't be parsing out the parameter to an actual value [15:20:59] You are right! Understood. [15:23:08] There's ways to suppress that to make it look cleaner [15:23:55] Would be great because it's very confusing to see errors in Page Preview after editing the template. [15:26:39] I think for that case... Wrapping in includeonly tags should work [15:26:52] {{#expr:{{{Year Founded}}} mod 3}} [15:27:24] Makes sense, thank you! [15:28:51] https://www.mediawiki.org/wiki/Transclusion#Partial_transclusion [15:41:35] You can also set a default value for a parameter when it's not defined: {{#expr:{{{Year Founded|0}}} mod 3}} [17:26:08] Is there a way to ask api.php for the complete matching line when performing a text search? I'm getting a truncated snippet with a leading "..." which I understand, but I want the full line for what I'm doing. [17:26:58] (or is this behavior perhaps globally configurable?) [17:28:22] In templatized forms, is there any way to supply an array as a parameter and then render it as a list? Do I need Extension:Arrays?