[03:03:02] hi. Can anybody help me with some trouble I'm having with templates? [03:03:57] Shibe2008: don't ask to ask [03:03:58] depends on the issue(s) [03:04:32] Trying to figure out how to be more specific. I suppose the first issue I have is a word to definition correspondence matter [03:05:17] what is the sort of embedding caused by curly brackets called? [05:13:00] Shibe2008: umm, it's called templates? [05:13:00] No, I'm pretty sure there's a broader term to describe the action that causes the template's entire source to be included as if it's part of the page in which the template is used, but thanks for trying [05:13:01] transclusion? [05:13:01] I think that's it. [05:13:01] you can use it for magic words or transcluding other pages (e.g. templates) [05:13:02] Yes, transclusion is the word I was looking for. [05:13:03] Anyway, the next matter is the actual "how the heck do I do this" of my problem. [05:13:04] The template in question is https://www.mediawiki.org/wiki/Template:Ambox [05:13:05] I'm trying tothe actual source that makes [05:13:06] Shoot, didn't mean to submit that message yet [05:13:06] leave it to Dragon NaturallySpeaking [05:13:07] (please disregard the previous three messages) [05:13:08] *4 [05:13:08] I'm trying to find the actual source that makes the ambox type "move" template work. The reason I want that source? I'm trying to make a template for another Mediawiki-based site based on the existing template that creates the move message box. [05:13:09] For instance, on example.net/wiki/some_article, if Somearticle needs to be moved, but I don't have the user right to move it myself, or just want community input first, I want to be able to just add "{{template:move}}" to the top of the page and get an info box just like on mediawiki org. [05:13:09] I'm hoping to do this by just copying the source from Mediawiki.org, but there seems to be so much transclusion and fancy code involved that I have absolutely no clue how to find the source I want. [05:13:10] Anyone? I realize is a ridiculously complicated situation, but that's why I'm hoping that at least someone, out of 274 users connected to this channel, can help simplify the situation. [05:13:11] A good place to start would probably be: [05:13:11] !exporttemplate [05:13:11] 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... [05:13:12] !exporttemplates [05:13:12] 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... [05:13:12] !export [05:13:12] To export pages from a wiki, navigate to Special:Export on the wiki, type in the names of the pages to export, and hit "export". See for an example of this form. See also: !import [05:13:13] !wptemplates [05:13:13] 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... [05:13:13] ... [05:13:13] * Reedy kicks wm-bot [05:13:13] an explanation of transclusion. [05:13:13] Reedy: what was the bot supposed to do? I'm completely new to this channel, and I'm more curious than a cat. [05:13:14] Give a useful response :) [05:13:14] Well that would've been a good start I suppose [05:13:14] You can use Special:Export to "include templates" which will include the dependancies you need [05:13:14] You'll need the ParserFunctions extension [05:13:15] Depending on if things have been migrated, Scribunto (Lua support) too [05:13:15] Reedy: labs is up the creek at the moment [05:13:15] Scribunto did come up somewhere in my search for an answer, specifically when I went to search what "#invoke" meant. I assume that's related to Scribunto? [05:13:15] so i would assume wm-bot is paddling up there as well [05:13:16] https://www.mediawiki.org/wiki/Module:Message_box [05:13:16] It's Lua all the way down [05:13:16] {{Foo}} -> Template:Foo [05:13:16] {{#invoke:Foo}} -> Module:Foo [05:13:16] Oh. I should've known. [05:13:17] But then, I'm new, so I've gotten excuse [05:13:17] *got an [05:13:17] Thanks for the help, reedy. I think I've gotten to the bottom of what was confusing me. It looks like the problem is simply out of my league, because I don't know Lua. [05:13:18] the part that was confusing me was the presence of {{#invoke:Message box|ambox}} In the source of template:ambox. [05:13:18] If I'm understanding what you mean, {{#invoke:foobar}} makes the page execute module:foo as a Lua script? [05:13:19] If so, I think I'd be better off just hardcoding the markup I want into the template I'm making, or just not bothering at all. [05:13:19] I think I'll go with the latter, because I'm tired, and the wiki the template is for is not my responsibility, anyway [05:13:19] Well, Modules are all lua [05:13:20] Yeah, I didn't even realize module was being invoked until you explained the purpose of #invoke... in hindsight, i probably should've realized that. [05:13:20] thanks for your help. I'm out of my league, but at least I know it now. [05:13:21] If you look at the history, there may be a version before it was lua-ised [05:13:21] https://www.mediawiki.org/w/index.php?title=Template:Ambox&action=edit&oldid=811933 [05:13:21] Might need to find the subpages and their relevant old versions [05:13:22] No, that's fine, I think I found a much simpler solution to my problem that requires minimal effort, which is the maximum amount I'm willing to put into this effort at the moment. Like I said, thanks for all your help, I'm basically done with this. [05:13:22] Fuck MediaWiki [05:13:22] * Reedy ragequits [05:13:22] :D [05:13:23] LOL, yeah, something like that, although I was thinking more specifically "fuck this template. *Ragequit*" [05:14:21] thanks wm-bot [05:14:21] Hey legoktm, you are welcome! [05:30:50] 0,, [05:30:56] Woops [06:05:43] can someone help me get https://gerrit.wikimedia.org/r/#/c/202735/ rebased ? that BounceHandler.php was removed in an earlier commit - but it looks like git rebase origin/master is not detecting that :\ Tried few times - no good luck [14:07:09] hi is someone around who is familar with node tests. I'm looking at https://github.com/physikerwelt/mathoid-server/blob/master/test/features/math/simple.js and was asking myself if there is a better way to structure the big testData object. I would prefere to have a folder that holds one json file for each test. [14:13:37] probably not the best place to ask [14:13:54] I would try -parsoid and #wikimedia-services [21:59:13] Hello, I have a question regarding the way mw is setting the session cookies and their 'destruction'. The reason is varnish cache is passing the request through where it shouldn't due to the cookies. And I can't differentiate between logged in and out user. Any idea ? [22:05:38] Anothermwuser: I believe Wikimedia's varnish setup has any user with a cookie that ends with "Session" through to the backends [22:12:21] legoktm: Yeah... I'm looking for a way to differentiate the users and then I can do some changes to vcl and the cookies. The thing is, when 'I' access MW no session cookie is present. After the login, that cookie is set. [22:13:05] logged out users should have no session cookie. logged in users do [22:13:13] or am I missing something? [22:13:33] Once I log out the the session cookie is still present. It's invalid on the server side and will be rejected, but the session [22:13:49] yeah, they 'should' be deleted [22:14:01] but they are still present [22:14:29] and I'm looking if this is normal or if it's something on my/server side [22:17:28] If the session cookie were to be removed, I would be able to make the cache ignore the logged out users [22:27:29] https://doc.wikimedia.org/mediawiki-core/master/php/User_8php_source.html#l03607 [22:27:45] this one should be the one removing the cookies, right ? [22:30:13] yes it is [22:35:38] Anothermwuser, deleting cookie is completely dependent on client [22:36:22] browsers and any other web clients should remove their cookie once it has expired [22:37:43] but I don't think there's a problem with your browser.. [22:39:40] Anothermwuser, did you check the varnish response? [22:41:04] As in ? [22:41:44] As it is now, it passes the response to the nginx behind it. And it reports a MISS [22:42:07] it I go in without cookies, varnish does send a cached version of the page [22:43:12] * Anothermwuser sighs [22:43:23] time to do something stupid and hope it works [22:44:32] I have a weird update-related question. I am not good with server-side stuff, so I've used the softaculous from my host to install a MW install. It has an update to 1.25.1, and I've made a backup and manual backups of the pages. Do you think any problems will arise going from 1.24.3 to the newer version via that update? [22:44:36] basically varnish will not cache the pages if there's a set-cookie header in backend response [22:46:14] therefore once you have clicked logout link, set-cookie header has to be sent to your browser [22:47:10] and once browser has received set-cookie header from your server, it has to be removed [22:48:46] Gregor12, no I don't think so [22:49:17] devunt: Okay. The only thing I have made changes to is really the LocalSettings to account for extensions. [22:50:19] don't forget to run maintenance/update.php via php-cli [22:53:13] Maybe extensions, but they shouldn't be a problem. [22:53:46] if you are upgrading it from something like 1.12, definitely there will be a problem [22:54:14] I have no idea how to do that; this will be updating from 1.24 to 1.25 via the softaculous install updater. I am no good with the server-side stuff. [22:55:33] anyway, as Anothermwuser said, maybe there will be some problem with extensions because of api deprecation [22:55:47] Okay, those are easy fixes at least. [22:56:28] if you encounter any warnings or errors after the upgrade, make sure that you have a up-to-date version of that extension [22:57:03] Well, as I upgraded from 1.22.* to 1.24. it took a few hours updating ~65k pages and ~ 460k edits... [22:57:30] I think around 4 hours. [22:58:25] however, to be honest, I don't have any experience with softaculous things [22:59:08] devnut: Question. I can modify the user login and logout functions to set some cookie and then remove it on logout, right ? [23:03:27] well, actually I like nuts, but my nickname doesn't have it :p [23:04:14] Anothermwuser, and yes you can do it [23:09:01] hope it doesn'T break anything.... [23:10:19] It's cool. I'm wary of trying it, so I might just leave it alone. It's a small personal locked-down wiki for a local gaming group. [23:11:54] if you have a backup, you can try it [23:16:00] it didn't work [23:16:12] and the session cookie is still there... sigh [23:16:49] I think there's a problem with varnish [23:16:52] but I'm not sure [23:17:57] let's see [23:19:13] btw I'm going to sleep now [23:19:30] if you have more questions you can ask to others [23:20:33] gute nacht [23:22:11] GDI [23:22:17] how did I miss it [23:22:18] UserID [23:22:32] it's only there once you've logged in [23:23:25] * Anothermwuser bashes his head against the wall [23:24:39] Now, let's try to move the cookies around and only make the users that have UserID set, pass directly to nginx [23:25:01] night