[06:00:58] Krinkle: it's very straightforward to add new git repos to codesearch, but I don't think putting them in the main search is a good idea because most of it is duplicated [10:59:45] https://area51.stackexchange.com/proposals/124244/mediawiki Join my forum proposal! [11:43:01] legoktm: ack, there'd be duplication of not only core (which is easy to exclude) but also extensions I guess.. [13:53:45] Hey all, Platonides in particular. I wanted to follow up on an issue I brought up here Friday about some PHP errors regarding a language cache issue: ""PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/sites/gw2w-es/languages/Language.php on line 620". I got some feedback from one of our main [13:53:45] editors, while he doesn't know the root of the problem, the 2 things to consider are whether the Languages.php code should be tweaked to better handle non-array results, and what the underlying cause of the issue is. [13:54:34] The specific error, given we run MW 1.34, comes from here: https://github.com/wikimedia/mediawiki/blob/REL1_34/languages/Language.php#L620 [13:55:09] He was wondering if something like this would be appropriate? `return ( is_array( $aliases) && count( $aliases ) ? count( $aliases ) > 0 : ‘some other default result if not an array, e.g. false’ )` [13:56:24] However, without a deeper understanding of the full context of that code/error, I wanted to try to get some feedback here before possibly submitting an issue to the github repo to discuss it there. [14:06:10] hello. I need help with mw 1.31.6 and WikiEditor - when I do a edit source and then save page, i get taken to a blank page [14:12:14] !blankpage [14:12:14] A blank page or HTTP 500 error usually indicates a fatal PHP error. For information on debugging (including viewing errors), see . [15:21:33] addshore: Do we still need the wmf.999 ref? [15:57:00] Krinkle: nope [17:52:14] Hi - does anyone have a guess as to roughly when VisualEditor will be able to work directly with MediaWiki, out-of-the-box, without the need to install NodeJS? [18:05:44] Yaron, I haven't worked on VE for years but one imagines they'll probably need to solve https://phabricator.wikimedia.org/T239743 etc. [18:08:21] Yaron: it already is! well, mostly, and it's a bit secret and not documented yet. Parsoid was ported to PHP, and you can get it working like this: https://github.com/MatmaRex/patchdemo/blob/master/LocalSettings.txt#L15-L27 [18:09:00] it's not out-of-the-box, as you'll need to clone the mediawiki/services/parsoid repository from Git. but it works perfectly fine, as far as i could tell [18:09:46] MatmaRex: well, when will it be... less of a secret? [18:09:52] also, i'm not sure which MediaWiki version that works with. i only checked the latest master [18:09:56] (That's good to know, though.) [18:10:17] That's fine - I assume it would require at least MW 1.35. [18:10:19] MatmaRex: parsoid is in composer.json in master... [18:10:40] Yaron: i think it was planned to come actually out-of-the-box with the MW 1.35 release, but i don't remember where i read that. there's probably some task somewhere [18:11:12] and i'm also not sure if it's still happening, since lots of things slowed down due ot the pandemic. but hopefully [18:12:02] Reedy: last i checked, you still needed to clone that repo, which connects stuff together i guess? unless that has also changed [18:12:21] I don't think so [18:12:22] https://github.com/wikimedia/parsoid/blob/master/composer.json#L2 [18:12:36] https://github.com/wikimedia/mediawiki/blob/master/composer.json#L51 [18:14:12] Reedy: hmm, wait, is that the same as mediawiki/services/parsoid? so it looks like you can get it via Composer *or* via Git (like everything else) [18:14:21] so that's nice [18:14:31] I'm not sure why you'd get it via git when it's defined in composer.json [18:14:39] (unless developing on it) [18:15:00] dunno, i set that up in december [18:15:11] I think in december it wasn't in composer.json [18:15:15] :D [18:15:39] Indeed. Not till feb [18:15:40] https://github.com/wikimedia/mediawiki/commit/15e0e9bb4b069484ee084f6ff2c83d0623906bf7#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780 [18:17:06] Okay, so Parsoid-PHP is not yet in MediaWiki, but it can easily be downloaded via Composer (or Git) - and then the latest VE (and MW) code will work with it, with those additional LocalSettings.php lines? [18:18:46] it's not in released MW. it's in master (and wmf deployment branches) [18:19:26] (yes, Parsoid JS and Parsoid PHP have the same API, you just need to configure the base URL to point to the PHP one) [18:20:12] Yaron: aha, i just found the task about releasing it in MW 1.35: https://phabricator.wikimedia.org/T248343 [18:21:46] which links to documentation at https://www.mediawiki.org/wiki/Parsoid/PHP (somewhat rudimentary at the moment) [18:23:26] Okay, so it's even simpler: the latest MW and VE code will simply work with another - although there's an effort in place to make them work even better with one another, by eliminating the need for the RESTBase middleman, if I understand this correctly. [18:23:52] ...and also eventually adding caching. [18:25:25] Although maybe sticking to MW 1.34, and the use of the Parsoid-PHP "extension", is safer. [18:26:07] ...until 1.35 is released. [18:29:02] MatmaRex: does that all sound correct? [18:30:07] Yaron: it sounds correct to me, but i haven't been following the work that closely, so don't quote me ;) [18:30:30] maybe cscott or someone can give you the up-to-date plan if they're around [18:31:54] Well, I don't really need to know the development roadmap or that sort of thing, assuming VE can already be used with Parsoid-PHP. I'm happy to set it up already, and then change it later on as new MW versions come out. [18:32:06] I just didn't think it was possible already. [18:33:25] MatmaRex: thanks! I guess I'll try that out, with your LocalSettings.php lines. [19:26:27] Need help with MW login system. How do I detect a returnto parameter in the URL (ex. Special:UserLogin?returnto=something&sso=some_sso_key)and if auth is successful, redirect user to a different URL based on returnto [19:51:47] Don't wanna spam here, just wondering if anyone has a good idea about how I can go about making a change to the login system ^ [20:07:34] wikihelp998: have you read https://www.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager ? [23:57:57] I have a function that is hooked to 'UserLoginComplete'. In the hook function, I wanna check if a few conditions are met and redirect user to an external site. What function can help me achieve this? [23:58:48] Using $this->redirectTo('externalurl.xyz') doesn't work [23:59:01] Throws error " Using $this when not in object context"