[00:00:03] the correct variants are {{#if: test | then-result | else-result }} and {{#ifeq: first | second | then-result | else-result }} [00:06:46] what taylan said [00:07:30] if anyone's interested, I made a tiny little Bash script to query the code of pages: https://paste.debian.net/1269973/ of course, it assumes that you don't use external storage, and also I ignored slot_role_id because at least for me it was all 1 :P [00:08:17] just noticed I can skip joining the revision table [00:09:13] and forgot the "limit 10" in there [00:10:59] is there any place MediaWiki users can share such little tips and tricks so others can find them? [00:12:34] according to the mediawiki website [00:12:45] they switched over to {{if [00:12:49] {{if|| [00:12:57] Slots users discriminated against every time [00:13:16] IDK where you read that, but they did not [00:14:16] Lol [00:14:16] https://mediawiki.org/wiki/Template:If [00:14:16] taylan: probably no better place than MW.org [00:14:49] "slots users" <-- the what now? last I checked MCR was a rather half-baked idea that was essentially de facto unused, both in core and by extensions [00:17:27] this feels like some ancient Meta template that was created to showcase an obscure parser corner case or something [00:17:31] HerrderZeit: The templates that exist on mediawiki.org aren't pre-installed in custom MediaWiki installations. You should use the if functions documented here: https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions Note that ParserFunctions is an extension shipped with MediaWiki, but it still has to be enabled explicitly if you guys haven't already. [00:18:46] ashley: would it be OK to just create a page in the main namespace called "Querying the wikitext of pages with SQL" or so? everything is so neatly namespaced so I dunno where a little trick like this would go. [00:19:34] It seems someone was really mad about whitespaces being stripped from parameters [00:19:40] well your own user page/user page subpage is always a safe bet, but given that it's a wiki (and what you're proposing is obviously within scope!), why not? :-) [00:23:13] oh derp, there's already a query doing exactly this at the bottom of this page: https://www.mediawiki.org/wiki/Manual:Page_table#Sample_MySQL_code shoulda looked harder haha [05:51:05] ""slots users" <-- the what now..." <- ashley: check out https://www.mediawiki.org/wiki/Extension:PageProperties [06:41:50] Hello, which versions of node and npm I should use for development stuff of MediaWiki? [06:42:21] I've upgraded Node to 18.x, but right now I'm thinking that it isn't a good idea, because before upgrade I had some issue with failing npm test command. [06:42:54] And I'm still having it, so maybe I'm using wrong version, I don't know. [06:43:21] Node.js is on like version 14 or something. [06:43:36] Oh :( [06:43:57] I'm trying to add stylelint now to one extension, so I can tell you which error exactly I'm facing locally. [06:48:23] Warning: Error while loading rule 'compat/compat': findUp is not defined [06:48:41] Occurred while linting C:\Users\zoran\Desktop\development\mediawiki-core\extensions\RevisionCommentSupplement\composer.json Use --force to continue. [06:48:49] Aborted due to warnings. [06:50:48] CI is using Node 14, let me downgrade to it.. [06:52:10] I would recommend setting up Docker and using https://gerrit.wikimedia.org/g/fresh [07:10:08] Warning: Error while loading rule 'compat/compat': findUp is not defined still on Node 14. [08:00:35] Does anyone know why this isn't working? I'm trying to get the contents of a table, "reports" from the DB, for an extension, but it keeps throwing `Error: Call to a member function getConnectionRef() on null` [08:00:35] Here's the code I've got thus far, am I doing this wrong? I'm following the Database Access Manual, but it doesn't seem to be working: https://pastebin.com/0mvJX33E [08:02:57] nb. typo `$this->showReportsPosts() should be $this->showReports()` but same result [09:49:34] edit: I added `$lb = MediaWikiServices::getInstance()->getDBLoadBalancer();` and I now get the error `Class 'SelectQueryBuilder' not found` [12:38:44] Hi, I have a question regarding LocalSettings.php: I tried to run a multiple wikis with a wiki family, so I tried the manual. According to the manual value $wikiID to either the values environment values "MW_DB" or "SERVER_NAME", but I haven't set them in my .env file yet. My question now is: are those the same values as "$wgDBName" and [12:38:45] "wgDBServerName" for my MariaDB settin or are those something different? [12:54:58]  Nevermind I found it myself [14:49:58] rundg[m]: interesting, thanks for the link! :) I wasn't aware of this (although I do know of a similarly named, different, pre-MCR thing of wikiHow origin, heh) [16:35:54] CindyCicaleseWMF: just set the KEYCLOAK_IMAGE env var [16:36:13] all images are overridable in that same format. _IMAGE [16:37:07] let me know if you see this, else I'll reply via email too :D [16:38:28] thanks, addshore ! I will look at that. Will something like that work to augment an image rather than replacing it? [16:40:24] augment how? [16:41:39] Run some additional commands to customize the container, like you'd do (I think) in a docker-compose.override.yml file. [16:42:03] hmm, no, currently something like that wouldnt be possible [16:42:28] generally speaking if you want to alter the development environment itself the expectation would be that you checkout the go code and build it all [16:42:37] however, ofcourse, i am open to new ideas :D [16:51:14] cool - that's what I thought, but I was hoping there was some hidden feature I'd missed ;-) I'll play around with it a bit and make any suggestions if I find a good way to do so [20:41:01] CindyCicaleseWMF: at some point I want to think about developing of the other services, rather than just of mediawiki, perhaps it fits into that category? [20:41:27] ie, be able to specify a custom Dockerfile perhaps, and also custom code to mount, similar ish to the mediawiki development flow of defining where the code of the service is [20:41:51] Reedy: how many bribes would you need for https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OAuth/+/887828 and the backport? [20:42:31] That looks dejavu in some ways [20:44:25] interesting [20:49:40] addshore: I would think it could be useful for that and other situations where you want to tweak the existing containers for a particular situation. [21:50:33] Can you rollback an edit without knowing username of the author? [21:50:33] Just rollback the last edit, whoever did it? [21:51:10] ? [21:55:21] Name of the user whose edits are to be rolled back. [21:55:21] This parameter is required. [21:55:26] * ``` [21:55:26] user [21:55:26] Name of the user whose edits are to be rolled back. [21:55:26] This parameter is required.``` [21:56:11] Is there no way to skip this? [21:56:45] Is this using the API? [22:00:01] Anything goes [22:00:33] As long as the unername parameter is not required [22:00:35] s/unername/user/ [22:48:47] Archimedes1560[m: the user param is required, no way to skip that via the API (or via the non-API, although the rollback links RecentChanges generates already include that param for you)