[00:06:54] @Reedy: Any idea what could still be getting in the way? [00:09:45] you did restart the webserver after? [00:38:29] yeah, I did [00:38:42] I did the force reload command like it said to [00:40:16] @Reedy: I'm going to go offline now. Thanks for your help! [00:40:24] I'll pick this up again tomorrow [00:40:36] quit [03:14:13] i have a jpg file that won't upload to my mediawiki instance. when i try and upload it, i get a warning "The file is a ZIP file that uses ZIP features not supported by MediaWiki. It cannot be properly checked for security." [03:15:14] where could I find more logs on that error? [04:01:14] k-man: interestingly enough, the jpg and zip formats can live in the same file, and that is sometimes used for steganography. However, that could also be a false positive where your image just accidentally has the zip header [04:01:56] "file" reports the image as being a jpg [04:02:37] right, because it has the jpg header as well. Chances are it's a false positive (unless the file is a lot bigger in filesize than you'd expect given the dimensions) [04:03:21] http://ix.io/2sKI [04:03:28] oh, that mentions something about TIFF data [04:03:54] try configuring $wgMimeDetectorCommand https://www.mediawiki.org/wiki/Manual:$wgMimeDetectorCommand [04:04:18] using the example given on the manual page (assuming your wiki is on a linux server) [04:04:24] it is [04:04:41] ok will do thanks. i'm in a zoom meeting right now - probably should concentrate on that first ;) [04:06:10] it is <- if that means the file is larger than expected given the image size, it may actually *be* a zip in disguise; you can try renaming it to .zip and then unzipping it [04:06:36] wouldn't file report that if it was? [04:06:42] but ok, I will try taht [04:07:05] well it'd also be a valid jpg so with the jpg extension maybe file just reports that? I'm not entirely sure [04:07:31] if this is a random file from the internet, do exercise caution though; some malware likes to hide in this fashion [04:08:01] thanks [04:50:29] our jobrunner seems to have stopped running jobs and I can't see any helpful log, still persisting after a restart. Any ideas? [05:02:32] btw, howdy folks! I'm trying to help RhinosF1 and I have *no* idea what I'm doing. My MediaWiki is rusty... [05:03:45] RhinosF1 I think some of the stuff that we're chatting about in DM/elsewhere might be good to put here: https://phabricator.miraheze.org/T5993 [05:04:18] robla: every log I can read has nothing of use, no icinga alerts [05:11:07] I'm writting a comment in your Phab describing my understanding of the situation (which is probably *completely* incorrect, so bear with me) [05:18:30] Ok, I posted a longer version of my understanding here: https://phabricator.miraheze.org/T5993#117159 [07:19:37] Hello [07:19:53] Can anyone here help me with my "Problem" ? [07:19:58] -> https://www.mediawiki.org/wiki/Project:Support_desk latest [13:04:29] Hi, I'm attempting to install mediawiki on my raspberry pi using lighttpd to host over the Tor network as an onion site. I've enabled PHP and fastcgi in my lighttpd config but every time I try to load the hostname/wikimedia/index.php or even any .php file in the server root directory itself it either 503's or 404's [13:05:08] before i enabled PHP in the lighttpd config however, it never gave an error 503 [13:05:37] So something *did* change which leads me to believe the root of the problem might not be lying with my lighttpd config? But I'm not sure [13:09:40] I'd be tempted to wipe your rpi and start fresh [13:10:16] As it won't even run phpinfo(); it's very much not a MW issue at this point [13:10:53] fair enough. It shouldn't take me too long to redo everything now that I've been through the process at least once [13:11:35] I'll let you know if it works after I've reset everything [13:12:28] that's it, don't wait for followups [14:10:20] Hi! I'm trying to get the Admin Links extension to pass Jenkins validation, but it's not working. You can see the error output here: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AdminLinks/+/617143/4 [14:11:43] The basic problem is that there's an "if" statement in there that is supposed to return "true" for the most recent version of MediaWiki, but it doesn't seem to be. Here it is: [14:12:01] if ( class_exists( 'MediaWiki\Special\SpecialPageFactory' ) || class_exists( 'MediaWiki\\SpecialPage\\SpecialPageFactory' ) ) [14:12:23] I also tried this, but it didn't work either: [14:12:34] if ( class_exists( 'MediaWiki\Special\SpecialPageFactory' ) || class_exists( 'MediaWiki\SpecialPage\SpecialPageFactory' ) ) [14:14:33] Isn't "MediaWiki\SpecialPage\SpecialPageFactory" the current full name of this class? https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/specialpage/SpecialPageFactory.php [14:18:26] Yaron: Try MediaWiki\SpecialPage\SpecialPageFactory::class (without the ') [14:21:22] Might need a leading \ [14:23:40] Reedy: thanks, I'll try both of those. [14:24:00] You can also do `use MediaWiki\SpecialPage\SpecialPageFactory;` at the top [14:24:07] (which will work if the class exists or not) [14:24:13] And then just use SpecialPageFactory::class [14:24:51] Ah... if do the "use", can I just call class_exists( 'SpecialPageFactory' ) ? [14:25:19] Yeah [14:25:40] Alright. I'll try some combination of those. :) [16:02:57] Reedy: (or anyone else) I don't know... I tried different combinations of "use" and not, class name in quotes vs. "::class", and leading "\" or not, and nothing has worked: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AdminLinks/+/617143 [16:03:33] In every case, the validator, when running through the code, seems to think that the class 'MediaWiki\SpecialPage\SpecialPageFactory' does not exist. [16:05:12] That looks phan is doing something it shouldnt [16:07:20] phpstorm thinks [16:07:20] use MediaWiki\SpecialPage\SpecialPageFactory; [16:07:21] and [16:07:24] if ( class_exists( SpecialPageFactory::class ) ) { [16:07:26] should be fine [16:10:30] If it's a bug in phan, maybe I'll just change the check entirely. [16:10:37] But the error isn't about the class_exists [16:10:46] 16:50:21 [16:11:08] It's because phan isn't paying attention to the if(), and it won't [16:11:16] Just put a phan ignore on it [16:11:18] Oh... [16:12:37] /** @phan-suppress-next-line PhanUndeclaredClassMethod */ [16:13:16] Okay, thank you. I'll try that. [16:15:53] hoping someone might be able to help me with some ShortURL problems [16:16:10] Using Apache, with these mod_rewrite settings [16:16:15] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f [16:16:55] any old links that were in the format of domain/wiki/index.php?title= are being redirected to a mediawiki "create a new page" named Index.php [16:17:29] navigating to domain/wiki/Page_Name works fine [16:18:12] I doubt you're only using that line [16:19:40] yep, that was from a separate file, sorry the rewrite rule is as such: "RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L] [16:26:25] there are the instructions I've followed, https://www.mediawiki.org/wiki/Manual:Short_URL/Apache, using same paths as the examples as well, mediawiki files reside in /w articlepath is set to "/wiki/$1" [16:31:03] It's easier if you pastebin the whole config [16:31:14] As those instructions hae various branches and "if that doesn't work..." [16:31:15] roger, Roger [16:36:23] Yaron: FWIW, you should also set a MW version requirement in the extension.json too [16:41:30] Reedy: yes... that's how this whole thing started. :) [16:41:54] Someone else created a patch to add the MW version requirement, but it didn't pass validation because of this unrelated error. [16:47:48] https://pastebin.com/68Tik2Qp - put these configs in place, same results, tried slimming down some of the rewrite rules to no avail [16:49:30] unrelated, but don't put ?> at the end of LocalSettings [16:55:33] thanks, just read up on it [16:59:27] Amusingly, on my dev wiki, I just do it with 3 Alias [17:00:46] I was getting to the point of trying mod_alias but the docs lead me to believe that was the less than desirable approach [17:01:17] DocumentRoot /var/www/wiki [17:01:17] Alias /w/index.php /var/www/wiki/w/index.php [17:01:18] Alias /wiki /var/www/wiki/w/index.php [17:01:18] Alias /index.php /var/www/wiki/w/index.php [17:01:22] is literally all I have [17:02:18] ill give it a try, nothing else in those configs related to the rewriting is different from the instructions as far as I could tell [17:02:36] They really need some rework [17:02:41] >Don't forget to enable overrides by AllowOverride All in /etc/apache2/apache2.conf. It is disabled by default in Ubuntu 12.04 and Ubuntu 12.10. [17:02:50] Like, I doubt we need instructions for 8 year old Ubuntu these days [17:02:54] this is a Cent7 system fwiw [17:19:13] mod alias doesn [17:19:18] mod alias doesn't do it for me [17:19:30] ShortURLs are now not being created [17:20:45] ShortUrls? [17:22:06] when I navigate to https://testwiki.domain.local/wiki/index.php?title=Some_Title, I want the canonical URL to be written via rewrite so you land at https://testwiki.domain.local/wiki/Some_Title [17:22:48] I think somewhere in the guide it says not to have the files in a /wiki/ else face caveats [17:23:01] they do not exist there [17:23:05] they exist in /w [17:23:19] Why are you navigating to /wiki/index.php then? [17:23:21] same as the guides examples [17:23:49] we have a crap load of old links in documentation that use that format [17:24:01] so they need to continue to work [17:25:13] to sum it up, I'm looking to "hide" the index.php?title= string in the URI [17:25:54] so you can navigate to the page either way, with index.php?title= or without [17:26:20] "fun" [17:26:46] https://www.mediawiki.org/wiki/Manual:Short_URL/Apache [17:27:12] supposedly it works, just not for this guy [17:28:45] You're going to have to do extra rewrites vs "normal" if you want to support those old urls [17:29:06] it's acting like index.php is not handling the URI though, since heading to the long form URL including index.php?title=Blah, lands you at the "Index.php does not exist would you like to create the page now?" [17:29:47] Probably because your rewrites/whatever are treating anything after /wiki/ as a wiki page name [17:29:58] what do you mean by "normal" that guide is specific to this exact scenario [17:30:00] so it's in theory using /w/index.php?title=index.php?title=Some_Title [17:30:13] https://testwiki.domain.local/wiki/index.php?title=Some_Title -> https://testwiki.domain.local/wiki/Some_Title [17:30:15] that is not normal [17:31:08] https://en.wikipedia.org/wiki/index.php?title=Some_Title ends up at https://en.wikipedia.org/w/index.php?title=Index.php&redirect=no for example [17:31:57] that works exactly as I would expect in my browser [17:32:26] https://en.wikipedia.org/wiki/index.php?title=Webserver_directory_index takes you tohttps://en.wikipedia.org/wiki/Webserver_directory_index [17:32:45] Only because of the MediaWiki redirect [17:32:58] the redirect.php page? [17:33:11] https://en.wikipedia.org/wiki/index.php?title=Some_crappy_title ends up at tohttps://en.wikipedia.org/wiki/Webserver_directory_index too [17:34:18] hahaha, what a terrible example I used [17:34:37] Basically, if your wiki files are in /w/ (as we generally suggest).. [17:34:50] I'd write some rewrites to deal with the old urls you've got to deal with [17:34:54] Let them execute first [17:35:02] Then do the normal "short" url rewrites [17:35:21] gotcha, appreciate the suggestions and help Reedy [17:35:30] buy yourself a beer tonight and pretend it was on me [18:01:01] Reedy: It took me an embarrasingly long time to figure out that https://en.wikipedia.org/wiki/index.php?title=Some_crappy_title -> [[Index.php]] is NOT a bug. [18:01:13] heh [18:13:19] Reedy: FYI, all the Admin Links issues have now been solved. Thanks! [19:25:50] is there a way to make api.php action=query return info about File: pages that are stored on wikimedia commons but accessible from a particular wikimedia wiki? [19:25:58] I'm not sure under the hood how that's hooked up in mediawiki [19:26:15] obviously you can also query commons.wikimedia.org/w/api.php directly [20:24:02] ningu: What information are you looking for? [20:24:14] I've got a feeling it might show basic information for some properties