[08:37:55] are there any tools to scrape the contents of a mediawiki instance? [08:38:11] you could use some recursive wget [08:38:41] but that could get messy when it comes to edit histories [08:56:36] bleb: scrape for what purpose? Mirroring a wiki? [13:58:25] Would I be able to use Markdown with Mediawiki? [14:00:12] vin_, no, see e.g. https://phabricator.wikimedia.org/T105068 [14:06:53] Hi! [14:07:16] I've just upgrade a mediawiki to 1.31 version from 1.26 version. [14:07:38] And my nginx conf doesn't work fine anymore. :-( [14:09:00] I've experimented some advise from https://www.mediawiki.org/wiki/Manual:Short_URL/Nginx and https://www.mediawiki.org/wiki/Manual:Short_URL , but I don't try to have something functional. [14:09:46] Here is the just migrated wiki: https://wiklou.org/index.php?title=Accueil [14:10:03] No way to use short url anymore. [14:11:18] ludo2: can you paste your nginx config somewhere so I can take a look? [14:11:32] Ok [14:12:53] Ok, thanks! [14:18:04] ludo2: please don't private message me, let's keep this conversation on this channel instead [14:18:09] https://pastebin.com/mP8zvXFL [14:18:12] OK [14:18:47] Maybe there is although need to consider LocalSettings.php file. [14:19:06] I can see that the config is trying to use "/w/index.php" but you have MediaWiki in docroot ("/" instead of "/wiki") [14:19:20] Oups. [14:20:12] it's not recommended to do that as it might cause some weird edge cases but it can be made to work somehow [14:20:58] What do you say it's recommand to? [14:21:16] To use subfolder as script path? [14:21:27] most people usually have it on a folder named "w" [14:22:13] To prevent copy/paste error like me I suppose. ;-) [14:22:44] heh, it's just an unwritten practice [14:23:01] see https://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory if you're curious why it's not recommended to run on docroot [14:23:55] Sure I'm curious about this. [14:24:54] OK. [14:24:58] Understanding. [14:34:18] Majavah: done [14:34:46] Thank's. [14:34:50] it works now? great [14:35:29] Hum. [14:35:42] Not totally. [14:35:59] ? [14:36:00] Thumbnail are ok here: https://wiklou.org/wiki/Sp%C3%A9cial:Liste_des_fichiers [14:36:26] But, when you click on a document: https://wiklou.org/wiki/Fichier:Caisse_outils_Atelier_Mobile_Plan_B.jpg [14:36:44] I've to check my nginx configuration. [14:37:51] ah [14:38:09] it's the location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { block at the end of your config file [14:39:49] http://spip.pastebin.fr/63562 [14:40:21] OK. [14:40:24] See [14:41:09] \o/ : https://wiklou.org/wiki/Fichier:Caisse_outils_Atelier_Mobile_Plan_B.jpg [14:42:07] Have you got an idea about thumbnailing error on main page: https://wiklou.org/wiki/Accueil [14:42:07] ? [14:44:23] can you show your current config? [14:45:32] Yes. [14:45:48] Nginx config or Mediawiki? [14:45:55] nginx [14:47:46] http://spip.pastebin.fr/63563 [14:49:18] try changing line 68 to try_files $uri $uri/ @thumb; [14:53:20] :-( [14:54:07] actually dont, that will probably break stuff [14:54:41] commenting out that whole location block should work, as images are already handled on the "location /w/images" block [15:03:50] I'm trying to make some correction too: http://spip.pastebin.fr/63564 [15:03:51] But no thumbnailing available. [15:05:06] have you set any LocalSettings variables related to thumbnails? [15:09:28] $wgResourceBasePath = $wgScriptPath; ? [15:10:53] If we look as the html code, we've got something like this: [15:11:14] [15:11:46] yeah, I saw that [15:12:00] I believe the problem is that it has "1,5x" instead of "1.5x" [15:12:07] and I'm trying to figure out why [15:12:15] And https://wiklou.org/w/images/thumb/8/88/Rouler_%C3%A0_bicycletteweb.jpg/300px-Rouler_%C3%A0_bicycletteweb.jpg is available. [15:12:59] OK [15:13:34] Majavah: well spotted [15:15:15] Which operating system does it run on? What happens if you do echo (string)(3/2); from a php file eg load.php and then view that? [15:15:42] Debian [15:18:14] php /tmp/test.php [15:18:15] 1.5 [15:19:47] https://phabricator.wikimedia.org/T181987 [15:21:29] https://www.mediawiki.org/wiki/Topic:U4dj6u0g7zkvhijl [15:25:04] Insert "setlocale(LC_NUMERIC, "C")" in my LocalSettings.php doesn't work for me. [15:25:50] $wgShellLocale probably overrides that [15:25:51] I've got the same problem in my local copy of the wiki. :-) A french configuration. [15:27:31] Must I set an english value for $wgShellLocale? [15:28:27] Will that not cause any other problems? [15:32:04] Here it is set to $wgShellLocale = "fr_FR.utf8" [15:32:39] Wich value can I set it to solve the problem? [15:38:00] sorry, had to disappear for a bit [15:38:02] i'd try $wgShellLocale = "C.UTF-8"; [15:39:46] It solves this issue. [15:40:43] Nice. Migration is OK and scripts are not located at root directory anymore. [15:40:49] Thanks Majavah [16:29:48] another good thing of people asking for help here is that we get to know cool wikis like yours ludo2 ! [16:55:34] ludo2: yeah, won't cause any issue. All localisation is handled by MW itself not by PHP or C [21:14:28] bleb: scrape for what purpose? Mirroring a wiki? [21:14:52] Vulpix: just to have an archive for when the wiki shuts down [21:15:27] it would be good to know how to set up a mirror, but i mostly just want to scrape the information down into some format i can look through on my computer [21:15:40] i have seen this page https://www.mediawiki.org/wiki/Manual:Grabbers [21:16:07] but it seems focused on tools that you run from one media wiki instance to mirror another [21:18:11] maybe there is some grabber that can be run as a script and stores the data as files? [21:19:47] https://www.archiveteam.org/index.php?title=WikiTeam have a tool for this [21:21:29] thanks i'll check it out [21:21:43] It all depends on what format you want the content [21:21:46] And how big it is [21:39:49] its not big [21:43:22] Grabbers lets you get the most closest possible clone of a wiki [21:43:51] You'll usually want this if you want to fork the wiki and you don't have access to backups [21:44:32] If you only want to save the pages for reading, WikiTeam may be useful, or even wget or HTTrack [21:44:57] that would require a bit of configuration to not recurse into page histories and such [21:52:26] Is there anyone around who can help me with a parser issue? I am calling Parser::replaceVariables() but sometimes I get a MWException. Not always (though not sure if that is just caching) and also this didn't seem to happen on MW 1.29, only since upgrading to 1.34. [21:52:40] (so far as I know) [21:57:20] HappyDog: stacktrace? [21:59:15] * Hazard-SJ says hi to legoktm [22:00:02] hey Hazard-SJ! how are you doing? it's been a while [22:01:10] I'm doing well! How are you, legoktm? [22:01:30] as good as one can be during a global pandemic :p [22:02:14] :P [22:07:29] https://dpaste.org/hw6B [22:08:33] replaceVariables() is passed a PPTemplateFrame_DOM object, which results in expand() being passed a PPNode_Hash_Tree object, which is not something it can handle (based on looking at the code) [22:49:32] Anyone got any suggestions to the issue I mentioned? I'll need to head off shortly. [23:04:50] I'll try again another day. G'bye!