[00:56:39] hi, how can i have a Lua module (scribunto on en.wikipedia) output pipes inside a template without escaping them? i'm currently just returning a string with pipes and embedding that in a template like {{Infobox | name = embed test {{#invoke:pipes}} }}, but then the output of "Module:pipes" always just gets mangled as part of the "name" in this case even though there are pipes in it [07:52:09] I need to always sort a mediawiki sortable table on a specific column. There seems to be no default way to do this. I thought I would just use jquery to click the table header element after page load. But I failed. [07:52:21] Anyone has a suggestion to do this hack? [07:55:52] Sry, found something to try here: https://meta.wikimedia.org/wiki/Help:Sorting [15:53:24] ahoy [15:53:52] hi rigid [15:53:56] i'm currently installing from git and the docs state "Or, if you don't want to use Composer or if want to use the exact same set of vendor libraries as used on the WMF production cluster, you can instead git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git to create a vendor/ directory inside the core folder" [15:54:19] but there aleardy is a "vendor" folder as submodule [15:54:26] *already [15:54:38] are the docs outdated? [15:55:02] this is what i'm reading: https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries [15:55:56] Yup, it is [15:56:09] (outdated) [15:56:10] It was a relatively recent change... [15:58:47] Reedy: ok, thank you [15:59:16] I wonder how better to word that [15:59:38] Because running composer yourself now is going to end up in a dirty w/c [16:00:07] "composer is now included as a submodule and doesn't need to be installed when installing from git" or something? [16:00:58] i guess the complete "fetch external libraries" paragraph can go [16:05:23] There's still cases you might need/want to do this yourself [19:22:33] anyone know how to sync the namespace of one wiki to another wiki on the same server? [19:23:35] As a one off? Ongoing basis? [19:27:04] ongoing [19:34:47] I have an open wiki (wiki1) that I use to "collect" semantic data from a wide variety of sources into the pages of a single namespace on the open wiki.. and I have a private wiki (wiki2) that contains lots of sensitive data that needs to be contextualized by the open data.. So if I can get page creation and page edits in namespaceX of wiki1 to be automatically "pushed" to namespaceX of wiki2.. that would do the trick. [19:38:12] How regularly do you want the updates? Like immediately, or say weekly/daily? [19:40:18] ideally.. immediately.. I'm imagining some SQL script that runs based on a hook triggered by pages edits in a single namespace.. does that sound reasonable? [19:40:18] that said.. what do you have in mind? [19:40:51] Well, if you could manage with infrequent updates [19:40:52] !export [19:40:53] 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 [19:40:54] !import [19:40:54] To import a few pages, use Special:Import - you can also import pages directly from another wiki (see !importsources). For mass imports, use importDump.php - see for details. NOTE: when using content from another wiki, follow the LICENSE TERMS, especially, attribute source and authors! [19:43:26] ah.. right.. a cron job to perform XML export an import at regular intervals.. that would be a decent solution for "nightly" updates if I can't figure out a "per edit" snyc solution. [19:45:15] I'm hoping fingers crossed that someone here knows of a "per page edit" solution [19:49:47] I'm guessing the answer would be a save related page hook which checks the NS, and fires the edit over to the other wiki via some method (not sure what'd be best) [19:51:30] !e Push [19:51:30] https://www.mediawiki.org/wiki/Extension:Push [19:51:41] is one other option.. But not sure how well it works on newer MW [19:51:58] I'm not sure if it does it in an automated fashion [19:52:46] yeah.. I've been playing with Push too.. [19:54:51] I'd suspect it should be able to modify it to do the extra work [19:55:03] Just might need some maintenance to make it work again as it's not been very active [19:55:10] can't get Push to work 😕 [19:55:11] Fails with "Could not obtain an edit token on the target wiki." error [19:55:21] Damn [19:55:25] Is the code that far out of date? [19:56:58] * revansx[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/bgtmbmBLHRkcsaBHIdYbFJow > [19:57:19] I don't mean your wiki, I mean the Push extension [19:57:34] The page reckons MediaWiki 1.17 - 1.19 [19:57:58] Updating it for token stuff wouldn't be hard [20:05:59] yeah, well, in the meantime - Push is not an option for me - nor is the ideal solution.. I really like your idea of a save related page hook which checks the NS and fires the edit over to the other wiki via some method (tbd) .. that's what I think the solution is.. I was talking with a MWF programmer earlier this year who mentioned the idea and have not been successful in contacting him since. [20:08:33] Do you need to keep edit attribution and such? [20:08:51] Push would be fine *if* it did it automatically [20:09:51] agreed [20:10:16] are you a maintainer of Push? [20:10:50] or a contributor? [20:11:28] Apparently I have some commits. Nothing of value though [20:14:37] Like I say, the token stuff would be pretty easy [20:15:09] well.. still.. thanks. I hope to someday make commits [20:15:28] not there yet [20:15:48] Can you write PHP? [20:16:30] yes [20:16:46] (enough to be dangerous and break things) [20:17:50] Updating the token stuff wouldn't be too difficult [20:17:59] Mostly, where in the API you request teh tokens from has changed [20:20:39] well.. knowing php isn't the same as knowing the MW software model.. i get real dizzy real fast loking at the php code the various extensions. [20:21:29] The changes that need making are in https://github.com/wikimedia/mediawiki-extensions-Push/blob/master/api/ApiPush.php [20:42:57] is this the current state of importing XML dumps? https://www.mediawiki.org/wiki/Manual:PostgreSQL#From_MySQL_to_PostgreSQL [20:43:20] MWDumper seems pretty outdated [20:47:07] rigid: the normal importDump.php maintenance script should work. MWDumper was outdated when I checked last year [20:47:38] Vulpix: thank you [22:02:09] Hey guys, do you need to initialize custom functions somehow besides adding them to the User.php file? I am getting the following error: "Fatal error: Uncaught Error: Call to undefined method User::customFunctionName() in" when calling the "customFunctionName()" function that I declared in User.php [22:04:30] It might be worth mentioning that the function was working fine in 1.23 but I recently updated to 1.31 and it simply doesnt work anymore [22:07:28] Muki: you shouldn't be editing any of the core files. Make an extension and use hooks instead [22:08:11] any edits to core files are completely lost on upgrade [22:08:30] which is exactly what you're experiencing [22:10:35] Thats fine since its only one small function and I dont do those updates that often. Im not familiar with custom hooks and extensions so I thought that the easiest way would be to add it to User.php since it's related to users, do you know why im getting that error? [22:11:23] https://www.mediawiki.org/wiki/Manual:Developing_extensions it's not that difficult [22:12:23] Muki: Because the function is no longer in User.php because you replaced the file and didn't keep your change in it [22:12:37] But as was said, don't modify core code [22:14:24] I will take a look at developing extensions and see if I can fix it that way. Also, the function is located in the updated User.php since I copied it over after the upgrade but I am getting that error so I though that you need to declare it somewhere else besides User.php [22:16:48] You didn't make it static? [22:16:57] It's not public? [22:17:03] You'd have to show us your code [22:21:47] Here is what the function code looks like: https://i.gyazo.com/25152ab8150d91b086669361b591ce8c.png [23:20:54] revansx[m]: I've done a load of cleanup on the extension... [23:21:04] And I think I've just made enough changes to fix the token getting [23:32:39] Oh, wow. I look forward to checking it out this weekend. Thank you! [23:35:17] I've probably broken stuff [23:36:48] https://github.com/wikimedia/mediawiki-extensions-Push/commits/master [23:53:29] Nah.. I'm sure it's all perfect 😂