[02:26:46] oh already merged. happy containering! [06:10:21] "Only Elasticsearch 7.10.x is supported. Your version: 7.17.9." oh so this is why suggestions were broken [06:11:00] since FreeBSD does not really do old versions I am probably shafted [06:11:45] hmm, no probably something else. I'm on 7.17.8 and suggestions work (assuming you mean the popup box when typing something into the search bar) [06:13:33] try rebuilding your search indexes perhaps? [06:22:55] moonmoon: it is what I get when I run the suggestions updater [06:23:51] moonmoon: https://dpaste.com/6YX9NQQP7 [06:25:32] I am not sure rebuilding index will help? [06:28:20] legoktm: I saw that you wrote some automation, nice! [06:38:09] hrm [06:40:44] * moonmoon would be tempted to edit out that version check since there aren't many breaking changes between 7.10 and 7.17 [06:41:11] a couple that might potentially cause some trouble, but otherwise seem unlikely to [06:48:43] I might just roll opensearch instead [07:30:19] "The process will require 1 GiB more space." thanks opensearch [08:08:35] oh I remembered why I decided not to last time, it demands certs [08:33:53] oh opensearch gives the same behaviour [08:33:58] "Fetching Elasticsearch version...2.8.0...Not supported!" lol [08:58:32] Remilia: You can download the exact ElasticSearch version required from ElasticSearch website. It's a tarball. Unpack somewhere and add a systemd service to start/stop it during boot [09:02:06] Vulpix: thank you for the instructions (I specifically mentioned the OS in use) [09:02:45] (so if you do not mind I will ignore the suggestion because the tarballs will not run and there is no systemd) [09:03:22] moonmoon: modified the version check and it seems to work for now, will move to opensearch later [09:03:31] lol [09:03:50] I found it funny too [09:04:09] 'add a systemd service on FreeBSD' is a good joke [09:06:46] systemd is the current standard on most linux systems. Excuse my ignorance about FreeBSD [09:53:55] Vulpix: aye, and systemd is tightly bound to the Linux kernel, which means you cannot use it with other platforms haha [09:55:01] I think you cannot run it inside FreeBSD's linuxulator either because of the lack of required syscalls/filesystem paths in the emulation layer [10:06:15] Can anyone suggest which MW program file(s) the target URLs of image links displayed with [[File:Some image.jpg]] can be globally modified? I'd like to change only a part of the target link URL of all images across a wiki, from for example File:Some_image.jpg to File.cgi?Some_image.jpg, without changing markup with the additional and optional link= parameter. In other words, the only change... [10:06:16] ...is for the first ":" in File: image links to become ".cgi?" [10:14:51] Tuxedo: You probably can do this easily with https://www.mediawiki.org/wiki/Manual:Hooks/HtmlPageLinkRendererEnd [10:15:41] This will run for all links, including links in recent changes, page histories or links to file description pages, though... [10:18:00] Or maybe https://www.mediawiki.org/wiki/Manual:Hooks/ImageBeforeProduceHTML is more appropriate here, or even https://www.mediawiki.org/wiki/Manual:Hooks/ThumbnailBeforeProduceHTML [10:53:59] Thank you Vulpix for the tips! Can these methods be configured in LocalSettings or, in case of HtmlPageLinkRendererEnd hooks for example, can I modify LinkRenderer.php in some way for the above mentioned (File:) generated image links to be change as described? [10:55:59] Tuxedo: the idea is to use hooks to avoid modifying mediawiki files. That way, you can easily upgrade to new versions and (hopefully) only adapt your code in case the hook gets obsoleted or some param changes [10:56:26] Yes, you can add the code to LocalSettings for now, although it's recommended that you create a custom extension to maintain that code [10:57:05] In the future, LocalSettings will be deprecated in favor of yaml or other syntax that doesn't allow direct php code [10:57:24] with a Cargo query, is there a way to have a template expanded after the query's CONCAT() function has done its job? like so: {{#cargo_query: fields = CONCAT('{{MyTemplate|', myField, '}}') = Blah, ...}} <- This example doesn't work because {{MyTemplate|', myField, '}} is immediately expanded as a template call. [10:58:35] The hooks I understand are applied in LocalSettings, which I have for other situations which is the preferred way. [10:59:28] By the way, I'm a somewhat restricted with my options as I'm stuck with MW 1.27.1 which I'm unable to upgrade very soon. [11:01:22] I guess I must change many things when upgrading to Cargo methods. [11:03:51] Using Hooks with ThumbnailBeforeProduceHTML can anyone give me an idea how to replace ":" with "File.cgi?" in links generated by image displays in LocalSettings? [11:04:43] Ideally, limited to anything that is a JPG, jpeg, etc.. [11:18:54] ok so this "works" except I use / instead of | for testing: CONCAT('{', '{RarityColor/', rarity, '/', name, '}', '}') [11:19:09] but the weird thing is... when I change it to a | like so: CONCAT('{', '{RarityColor|', rarity, '|', name, '}', '}') [11:19:18] then it suddenly says "Error: Unclosed string literal" [11:19:37] and I just don't understand why, it must be a bug in how cargo parses things [11:20:22] so close :( [11:21:03] even weirder is, I can use the pipe symbol in other contexts, like with CONCAT('[[File:', fileName, '|thumb|200px|', caption, ']]') [11:21:17] why does that work, but it doesn't with the other one? [11:23:53] tried to use char(124) ... "SQL function CHAR() is not allowed" q_q [11:24:27] GOT IT! using {{!}} [11:29:27] oh... there's also a display format called "template" which makes it invoke a template for each row, I could have just used that *facepalm* [12:28:05] How can a ThumbnailBeforeProduceHTML hook in LocalSettings replace "File:" with "File.cgi?" links for image links? [12:28:30] Without an extension. [12:29:33] https://www.mediawiki.org/wiki/Manual:Hooks/ThumbnailBeforeProduceHTML [12:29:59] "For examples of extensions using this hook," and go through tags to some ancient MW version [12:30:07] without extension.json [12:30:14] On mediawiki.org/wiki/Manual:Hooks/ThumbnailBeforeProduceHTML it reads the functionality is available from version 1.21 so it should work on 1.27.1. [12:31:47] I think you ignored what I just said so, well, [12:33:15] Sorry I did not not see. [12:35:46] tbh would be a lot easier to look at BoilerPlate or Examples extensions [12:36:31] You mean there are examples at mediawiki.org/wiki/Manual:Extension_registration page? [12:37:43] Can ThumbnailBeforeProduceHTML be used without an extension, i.e. just by code in LocalSettings for the above, is so, how? [12:38:03] Yes, all hooks can be implemented in LocalSettings.php [12:39:48] I'm not sure how to code the File change. Can anyone give a short example or perhaps something similar? [12:40:55] Maybe it's easier to change the part of the MW program file(s) that outputs the image or thumbnail links to begin with. Which is or are those specific files? [12:43:02] I don't think so [12:43:33] However, the hooks page indicates where the hook is defined, which is likely the place where you can modify the code yourself [12:45:57] does anyone know a good way of making PageImages return an image of my own explicit choice? we're having the issue that it seems to completely ignore images introduced by a template, even though it's a very prominent image at the start, like here: https://bg3.wiki/wiki/Fire_Bolt [12:46:18] I meant if so, how? [12:47:29] If any one here can give a bare example it would be much appreciated. [13:19:29] I can't find anything close to what I need at Manual:Extension_registration [13:22:39] Is anyone here that knows who can tell me which MW program file(s) generate the File: html link before a thumbnail or image display? [13:23:17] Many thanks [14:36:04] gromit: yeah, hopefully it eases the maintenance burden going forward :)