[02:05:10] Is there a way to make users input their current password before they can change it? I'm using MediaWiki 1.33.0 [02:19:55] Hi signux. [02:20:38] I think MediaWiki already does that? [02:32:50] I think you're right, Poppy. Thanks [04:49:07] Another satisfied customer. [08:29:59] Hi there. I've developped an extension to mediawiki to allow adding and editing workflows using https://bpmn.io. Now I'm trying to make it usable with the VisualEditor. The "gadget" examples allowed me to add an entry to the "insert" menu and I can insert content with it, but I can't seem to figure how to add content as xml (my extension handles [08:30:00] tags in pages content). Docs seem to be pretty lacking still and I'm no javascript guru (nor in any language really). Would anyone knowing VE's API well enough be willing to "tutor" a noob ? [09:50:42] alainfa: VE experts are few and far between... if you don't get an answer here, perhaps ask on the wikitech mailing list [10:01:52] duesen: yes, I kind of both feared and expected such an answer :-) I'll try on the ML, then. Thank you. [10:16:47] hi [10:17:01] how up to date is the ubuntu mw package> [10:17:03] how up to date is the ubuntu mw package? [10:19:13] 1.27.4-3 [11:29:58] 1. wfLoadExtension( 'Elastica' ); [11:30:31] 2. php maintenance/updateSearchIndexConfig.php [11:31:43] 3. [wikicod@server CirrusSearch]$ php maintenance/updateSearchIndexConfig.php [11:31:44] /home/wikicod/domains/wikicod.ir/public_html/w/includes/GlobalFunctions.php(50): ExtensionRegistry->queue('/home/wikicod/d...') [11:31:44] /home/wikicod/domains/wikicod.ir/public_html/w/maintenance/doMaintenance.php(81): require_once('/home/wikicod/d...') [11:31:46] /home/wikicod/domains/wikicod.ir/public_html/w/includes/registration/ExtensionRegistry.php on line 117 [11:36:00] please help me>.< [11:42:08] please help me [13:30:36] wfLoadExtension( 'Elastica' ); [13:30:37] $wgDisableSearchUpdate = true; [13:30:37] /home/wikicod/domains/wikicod.ir/public_html/w/includes/registration/ExtensionRegistry.php:117 [13:30:40] /home/wikicod/domains/wikicod.ir/public_html/w/includes/Setup.php(105): require_once('/home/wikicod/d...') [13:30:41] require_once('/home/wikicod/d...') [13:38:02] You're not providing anything in terms of an error message... [13:38:10] As such, it's hard to do much with that informatino [17:38:51] Reedy: by the way I was wondering, why instead of manually implementing HTTP requests via sockets not just use PHP's built-in file_get_contents with a context with method set to PURGE? [17:39:02] in SquidPurgeClient [17:39:40] Pass :) [17:42:34] I should try implementing that since it should be trivial [17:43:08] I wonder if in 2010 it was not possible to set method to PURGE [17:44:10] I imagine it's probably something along those lines [17:44:16] And no one has really revisited it [17:55:33] Reedy: I just tested and it works perfectly fine, plus unlike the current implementation it will likely work fine with IPv6 [17:55:48] patches welcome :) [17:56:07] It's either that, or we had some weird very specific implementation for Wikimedia [17:58:03] I think there might be one possible cause for reimplementation, checking right now [18:02:05] nah [18:02:26] varnishlog shows exact same output for mediawiki-invoked purge and for my get_file_contents [18:02:50] I do note we don't use get_file_contents generally... [18:02:59] We have HTTP request wrappers [18:03:12] that is even better [18:03:42] Have a look at the Http class and also HttpRequestFactory [18:04:46] yeah I am already looking at this [18:05:30] though I am not well versed in PHP enough to know how to make a tiny script that would be able to use these classes to just write a short test script [18:05:43] going to look at eval.php [18:06:06] oh [18:20:58] Reedy: https://doc.wikimedia.org/mediawiki-core/master/php/classMediaWiki_1_1Http_1_1HttpRequestFactory.html does not have a description for execute() but sparql/SparqlClient.php which I found references to the factory in uses that instead of request() after create() [18:21:12] does it mean it uses some other class or am I missing something? [18:21:47] request() just does the request etc [18:21:56] create gives you a MWHttpRequest object [18:22:08] oh right [18:22:33] sorry, it is late here and I spent all day translating marketing babble [18:22:46] brain not functioning at full capacity [18:23:00] :-) [18:28:28] MWHttpRequest is a bit not to HTTP spec [18:28:55] it does not allow multiple headers of the same name [18:30:20] though I think it does not matter here since I can collapse accept-encoding [18:31:43] I imagine that's due to some php array issue [18:43:44] setHeader simply does array['key']= [18:44:12] does not matter, I need to find out why my PURGE done via MwHttpClient is it not hitting varnish [18:45:02] something tells me setting the Host header makes it discard the host part of the URL [19:04:07] Reedy: is it possible to override the host header in MwHttpClient? [19:04:23] setting the Host header does not work [19:04:44] er [19:04:46] Request [19:04:48] not Client [19:05:28] Not obviously, no [19:05:59] this makes it incompatible with reverse cache servers D: [19:06:44] since you have to specify the IP:port for the cache servers while sending correct Host: headers to make sure it purges the right virtual host [20:21:22] Reedy: all right I really do not get it, my short script that uses curl and has Host: in the header list works fine and the Host header is set correctly [20:21:30] same with get_file_contents [20:21:53] and I do not see MWHttpRequest doing anything about the Host header explicitly [20:23:29] Doesn't seem to [20:26:42] (sorry I'm doing numerous things at once) [20:28:11] please do not mind me, I am clearly not in a hurry [21:29:22] found the culprit, time to see if anything can be done about it [21:36:15] Reedy: https://github.com/guzzle/guzzle/issues/1678 :( [21:36:34] that's it [21:39:14] Reedy: should I prepare a patch set that 1) changes GuzzleHttpRequest to use the middleware approach if the Host header is set and 2) switches SquidPurgeClient to use HttpRequestFactory? [21:39:27] since 1) is required for 2) [21:40:33] What do you mean for the first? [21:41:10] MediaWiki uses the Guzzle HTTP library by default, and this library ignores the Host header by design unless you add a small "middleware" bit [21:41:19] see here: https://github.com/guzzle/guzzle/issues/1678#issuecomment-281921604 [21:42:12] the example I linked only inserts this middleware if the Host header is present [21:42:37] so for literally any case except the CDN purge client the behaviour will not change [21:50:14] (and if I change httpEngine to either curl or php everything works as expected) [21:59:19] oh wait, this might not be needed [22:22:31] Reedy: thank you for the assistance re: HttpRequestFactory, I am going to completely refactor SquidPurgeClient.php [22:22:37] fancy :) [22:22:39] good luck [22:25:45] Reedy: as an example this works fine with guzzle: https://paste.ee/p/xr99I so I just need to change the stuff in SquidPurgeClient.php into this properly [22:26:03] this is *way* cleaner than what is up there at the moment [22:26:31] :) [22:26:41] It's probably fallen foul of "if it ain't broke, don't fix it" [22:26:54] yeah it is broken on freebsd though [22:26:55] :D [22:27:11] hopefully if I do this instead of the current patch set [22:27:22] people will not ask about whether MSG_EOR is needed or not [22:27:56] someone would need to test it against things like CloudFlare and Squid though [22:28:11] (though I see no reason for it to fail in any way) [22:29:04] Wikimedia don't use squid infront of MW anyway these days... [22:29:11] So the class name is kinda dated too [22:29:42] should be CDNPurgeClient or something yeah [22:30:19] Probably, based on how we've renamed other stuff [22:30:27] took me a while to realise it uses guzzle instead of curl [22:31:46] I should probably call off that patch set then [22:33:39] Reedy: what would be the correct approach? abandon the current change and submit a new one, or review the current one? [22:33:45] Probably, yeah [22:33:51] Can leave it for the moment, there's no real rush [22:34:42] I do not figure anyone will get to merge it anytime soon anyway [22:35:18] I have a patch on my review queue (awaiting remediation) from November 2013 [22:40:01] well, at least my patch fixing more postgresql errors in Cargo has been merged already \o/ [23:09:16] Hi [23:10:40] This plugin does not work with SyntaxHighlight. Where's the problem? Please guide Ken [23:12:47] Hi [23:12:54] This plugin does not work with SyntaxHighlight. Where's the problem? Please guide Ken [23:13:05] Sample: https://wikicod.ir/wiki/Test [23:25:43] Alooooo [23:25:47] Hiiiii [23:46:39] Hi [23:46:46] This plugin does not work with SyntaxHighlight. Where's the problem? Please guide Ken