[02:54:19] depends what kind of modifications you want to make [07:55:56] Hello dear members of MediaWiki community. [07:56:13] I have a question regarding authentication via SSL certificates. [07:56:48] If I have MediaWiki LTS ver 1.31.6 then which extension is suitable to authentication? [07:56:50] Thanks [08:49:03] Pavche: https://www.mediawiki.org/wiki/Extension:SSL_authentication https://www.mediawiki.org/wiki/Extension:SSLClientAuthentication maybe? [09:13:32] andre__, I will try that extension. Thanks. [18:13:20] When using oversight/delete revision on article history revision, is there a way to remove these striked entries short of modifying the database? [19:03:03] that is deliberately not possiblw [19:03:05] possible* [19:33:10] from a mediawiki extension, I am calling new UploadFromUrl() and using the uploader returned to upload an image file. I notice that mediawiki is automatically creating a series of thumbnails for the image I upload. what controls how it does that? [19:33:21] and can I change what thumbnail sizes are auto-generated? [19:33:36] $wgUploadThumbnailRenderMap [19:33:46] * When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to [19:33:46] * prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, which [19:33:47] * has a performance impact for the first client to view a certain size. [19:33:54] aha, thank you [19:33:57] awesome [19:34:29] hrm... so the default is none? [19:34:44] I wonder if something else is setting it that I don't know about [19:35:29] LocalSettings? [19:35:45] I can't see any extension obviously setting it [19:36:29] yeah, weird [19:36:47] going to experiment a little [19:37:00] Try `var_dump( $wgUploadThumbnailRenderMap );` from eval.php? [19:37:40] ah cool, was wondering if you could do something like that [19:37:46] yeah it's an empty array [19:38:04] however the code (which I actually inherited) has this: [19:38:05] $localFile->createThumb(400); [19:38:09] shouldn't that only create one thumbnail? [19:41:00] In theory [19:44:14] going to try taking that out and see what happens [19:52:08] Reedy: another question, is there a record of each thumbnail in the database or does mediawiki just check on disk? [19:52:19] basically -- if I want to purge certain thumbnails how do I do it? [20:02:39] Just delete them [20:02:45] ok [20:03:17] meanwhile I notice the img tag, which comes out of this wikitext from a template: [[File:{{{LocalFileName|}}}|400px|thumb|none]] [20:03:20] is showing: [20:03:29] srcset="/images/thumb/1/1c/aji-kreket_0.jpeg/600px-aji-kreket_0.jpeg 1.5x, /images/thumb/1/1c/aji-kreket_0.jpeg/800px-aji-kreket_0.jpeg 2x" [20:03:44] so although it's a 400px thumbnail asked for, it gives options for 600px and 800px (which for some reason are auto-created) [20:04:08] and if I delete those, there's a possibility of broken image in the browser if the browser asks for one of them [20:04:28] so.... what do I do if I just want 400px around? haha [20:04:52] this is for a deploy of this mediawiki where storage is more limited so we need to figure something out [20:04:58] the main deploy is fine [20:05:12] Usually MW is setup with a 404 handler for images [20:05:25] eh? [20:05:28] If I a thumb is requested, and it doesn't exist, it'll try and generate it [20:05:33] is that part of web server config? [20:05:37] oh [20:05:51] https://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Johannes_Wilhjelm%2C_Skagens_gamle_kirke._Nat%2C_1910._SKM1393%2C_Skagens_Kunstmuseer.jpg/1000px-Johannes_Wilhjelm%2C_Skagens_gamle_kirke._Nat%2C_1910._SKM1393%2C_Skagens_Kunstmuseer.jpg [20:05:57] So you can just put any random px in, and it'll give you an image (usually) [20:06:05] hrm well I'll see why that isn't working [20:06:17] do you know where the srcset is coming from? [20:06:41] and is that on-demand thumbnail stuff configurable? [20:08:44] It looks like code possibly from Html::srcSet [20:09:07] But I don't think MW does that for arbitary content file images [20:11:25] ningu: well in practical terms, the srcset helps those with higher resolution screens. Someone with 2x display scaling will load the 800px image to prevent it from appearing blocky/blurry on the display [20:12:30] (and someone with 1.5x scaling will request the 600px image for the same reason) [20:13:41] so, those two extra images will most definitely be used if someone browses to that article with such a device [20:17:53] ningu: If you want to disable responsive images (the srcset thing), you can do that with this setting: https://www.mediawiki.org/wiki/Manual:$wgResponsiveImages [20:21:04] TIL :) [21:33:08] cool, thanks! [22:45:14] Vulpix: on one install of this mediawiki setup, it only generates the thumbnails requested -- 400px plus the 1.5x and 2x ones in that setting. but on another machine, it seems to generate a bunch more including 120px, 180px, 240px, 320px, 1200px, 1599px. any idea what could be causing that? [22:45:58] Same browser/browser versions? [22:46:04] Some browsers do speculative loading... [22:46:19] hrm... ok [22:46:25] maybe [22:47:07] I'm just wondering, for cases where disk space is a concern, if you can turn off the auto-thumbnail generation and make it explicit only [22:47:20] i.e. in the upload code it makes 400px/600px/800px and others won't be made [22:47:30] the setting above is a bit different [22:47:45] maybe https://www.mediawiki.org/wiki/Manual:$wgGenerateThumbnailOnParse [22:49:18] what does "parse" mean here? does every wiki page get parsed on view, rather than save? [22:49:50] Yeah, a view would trigger a parse [22:50:01] Because there are user options can vary the output [22:50:50] Reedy: do you happen to know if HtmlPageLinkRendererEnd can be used to modify links before page view (but not how they're stored in teh db)? [22:51:00] specifically external page links [22:51:09] that hook I mean [22:51:23] it says "Used when generating internal and interwiki links in LinkRenderer, [22:51:24] just before the function returns a value" [22:51:31] but I don't know when LinkRenderer is actually called [22:51:54] I wish there was a better overview of the control flow [22:53:03] It says interwiki and internal links [22:53:04] Not images [22:53:16] yeah sorry, I changed topics :) [22:53:42] these two things have both gotten me down a rabbit hole. I solved the link thing doing a nasty search/replace on the whole page output [22:56:48] Where HtmlPageLinkRendererEnd is called from... [22:56:53] "Builds the final element" [22:57:05] Reedy: right but is that building it to store in the db? or to send to the browser? [22:57:33] Just to send to the browser [22:57:36] I think [22:57:43] ok [22:57:52] As it's building HTML [22:57:58] And we don't store HTML for links in hte database [22:58:07] yeah, see, I didn't know exactly in what form it was stored [22:58:17] Well... Depends what you're talking about [22:58:22] For the page text, it'll be stored as is [22:58:32] For the purpose of optimisation, we have tables that have the lists of links/urls [22:58:36] ok, so the html is always rendered on the fly? [22:58:41] Well, not always [22:58:41] (or from cached version) [22:58:43] There's a parser cache [22:58:44] Yeah [22:58:49] but I just mean it isn't stored in the db [22:59:10] You could store the parser cache in the database... [22:59:19] $wgParserCacheType = CACHE_DB;; [22:59:28] Just to be awkward [23:00:01] where is it stored by default? [23:00:26] Um [23:00:27] CACHE_ANYTHING [23:00:28] php has some sort of cache it can use iirc [23:00:32] "Use anything, as long as it works" [23:00:35] yeah [23:00:45] it can use APC, APCu, WinCache, Memcached... [23:01:08] Basically, it'll find something it can use and try and store it there [23:07:01] ok. well this is all very slowly making sense [23:07:09] the number of levels to the thumbnail management kind of makes my head hurt [23:07:27] it works well out of the box but if you want to change it, you need to have a clue what you're doing :)