[06:46:31] Hi, i have a problem with the VisualEditor Extension in 1.35. When im creating pages i can use the VE Extension but if i want to edit them i get the error "Error contacting the Parsoid/RESTBase server: http-bad-status". Can somebody help me with this probem? [07:25:20] hmm intriguing, webp ignores $wgUseImageMagick [07:26:10] Expected since MediaWiki has no WebP support [07:26:32] Vulpix: interesting since webp is in the default list of upload extensions [07:26:41] and mediawiki calls $wgCustomConvertCommand for it [07:26:46] er [07:26:47] not [07:27:02] it calls $wgImageMagickConvertCommand, instead of $wgCustomConvertCommand [07:27:23] does that mean MediaWiki uses imagemagick for all unsupported image types? [07:28:28] the File: page shows "Error creating thumbnail: sh: /usr/local/bin/convert: not found Error code: 127" and that matches my $wgImageMagickConvertCommand with $wgUseImageMagick = false; [07:29:01] I don't think so. Unsupported image types get no thumbnails at all (for example, PDF without the corresponding PDF extension whose name I don't recall now) [07:29:01] commenting out $wgImageMagickConvertCommand makes it try /usr/bin/convert [07:29:16] then I really do not understand [07:29:22] The default in LocalSettings.php [07:29:28] yes I know [07:29:28] *DefaultSettings.php [07:29:57] let me reiterate: I do not have imagemagick, I use $wgCustomConvertCommand = "/usr/local/bin/gm convert %s -resize %wx%h %d"; and have $wgUseImageMagick = false; [07:30:23] MediaWiki shows "Error creating thumbnail: sh: /usr/local/bin/convert: not found Error code: 127" for File:whatever.webp [07:31:14] https://www.mediawiki.org/wiki/Manual:$wgFileExtensions shows webp in the defaults for 1.27+ [07:35:35] Ok, WebP is supported, but not for generating thumbnails in WebP format. Not your problem though [07:36:20] It may be that gm requires convert to be installed on the system [07:36:40] If in doubt, execute the command directly on the command line and see if it complains about convert [07:40:49] Vulpix: gm does not require convert, it is its argument [07:40:59] convert is ImageMagick [07:41:16] I know, but a quick search on the Internet led me to this conclusion [07:41:21] hmm [07:41:34] GM requiring IM sounds really suspect [07:42:04] Vulpix: wait, but why does it respect $wgImageMagickConvertCommand [07:42:48] if it is gm calling convert, wouldn't it ignore PHP variables_ [07:42:51] ? [07:44:26] !wg CustomConvertCommand [07:44:26] https://www.mediawiki.org/wiki/Manual:%24wgCustomConvertCommand [07:44:39] We added support for webp a little while back [07:45:18] > This setting is overridden by $wgUseImageMagick. If your custom converter is not being invoked, check that $wgUseImageMagick is not set to true. [07:45:28] Non image magick convert methods don't get a lot love, its probably just broken for webp [07:45:33] [10:29:55] let me reiterate: I do not have imagemagick, I use $wgCustomConvertCommand = "/usr/local/bin/gm convert %s -resize %wx%h %d"; and have $wgUseImageMagick = false; [07:45:43] JPEG and PNG are being converted by gm [07:45:52] there are no errors for those [07:46:06] !debug [07:46:06] For information on debugging (including viewing errors), see https://mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging Also see https://mediawiki.org/wiki/Manual:Errors_and_symptoms [07:46:27] I see [07:46:32] probably just my installation broken [07:46:37] will look into it later [07:46:53] Hmm, but actually looks like we don't do anything special for webp, so it should use the same settings as png [07:46:55] (it is a relatively clean 1.35.2) [07:46:56] or jpg [07:47:23] bawolff: I went through media/* and yeah I just do not get it [07:47:43] will research after I have some tea :\ [07:47:55] The actual conversion should be handled in BitmapHandler [07:47:59] And yes, the code is not clear [07:49:51] Remilia: Are you sure that image magick isn't working for jpg/png. There's lots of situations for those where mediawiki will either use the original file or a cached version, and it might not be immediately obvious if thumbnailing is broken [07:50:03] bawolff: it works for PNG/JPEG for sure [07:50:10] gm I mean [07:51:49] Like e.g., you've testing using thumb.php to get a thumbnail for a size that has never been requested before? [07:52:51] bawolff: file uploads that happen daily on this MW instance [07:53:06] -that* [07:53:09] Oh. I'm wrong, webp is overriding things to only use image magick [07:53:28] bawolff: thanks [07:53:30] WebP::getScalerType() returns 'im' [07:53:43] which tells TransformationalImageHandler to always use image magick [07:53:58] sorry, the code around image rendering is really confusing [07:54:51] I really do not want to install VulnerabilityMagick… [07:54:54] oh well [07:57:26] lol, yeah, image magick does not have the best record [07:57:50] I think MediaWiki has support for integrating firejail, which can reduce risk around image magick [07:58:40] Remilia: https://www.mediawiki.org/wiki/Manual:$wgShellRestrictionMethod if its helpful [07:59:25] I could probbably make a suid script that calls imagemagick inside a jail with nullfs-mounted image paths [07:59:30] haha [07:59:39] although i have no idea if MW's thumbnailing stuff actually uses the new shell restriction framework [07:59:42] bawolff: it is not Linux [07:59:59] Well there goes that :) [08:00:19] yeah I should just move mediawikis to a separate jail [08:00:53] Some people also use Thumbor for images instead of Mediawiki's built in support [08:02:08] https://wikitech.wikimedia.org/wiki/Thumbor if its helpful [08:02:24] thank you, I will look into it [08:02:38] though just creating a jail for MW sounds like the best solution [08:06:17] bawolff: does XCF in the method comment refer to The GIMP's XCF? [08:06:31] yeah. ImageMagick has shitty support for it [08:06:35] That doesn't work very well [08:06:57] But some people want to upload them as "source" files, and then MW does best effort thumbnailing [08:07:23] maybe I should just comment it out in my source [08:07:24] * Remilia hides [08:07:48] If you look through the list of xcf uploads at https://commons.wikimedia.org/wiki/Special:MIMESearch/image/x-xcf you'll definitely notice that the thumbnails are mostly broken [08:09:11] Well, unless you specificly enable it in the file ext whitelist, people should not be able to upload any xcf files anyways [08:09:14] bawolff: wait, I do not get it, why is XCF mentioned in WebPHandler [08:09:32] is it a case if copy-paste [08:09:35] oh [08:09:42] that looks like copy-paste error [08:09:57] https://github.com/wikimedia/mediawiki/blame/master/includes/media/WebPHandler.php#L303 [08:09:58] this [08:10:44] but yes, if you comment out that method, it should go back to the default of using a custom convert command [08:11:26] bawolff: should I file a bug on phabricator for this? [08:12:04] probably, but at the same time, given how little love this area of code base gets, its probably not going to be fixed anytime soon [08:12:38] I could probably submit a patch, I think I still have git-review installed [08:13:08] from when I found hard-coded Linux-only socket stuff in SquidPurgeClient [08:13:28] As an aside, if you don't, git-review is basically just short hand for: git push origin HEAD:refs/for/master [08:16:38] The thumbor page on wikitech is interesting. However, this point in rationale totally conflicts with the rest of the page: "Easier operations: Thumbor is a simple service and should be easy to operate." [08:19:41] lol [08:21:25] Thumbor looks like a really nice option but right now I am not sure I want to research how to plug in into my set-up [08:22:54] and huh you need a lot of customisation there… [08:23:17] bawolff: once again many thanks for helping with the webp issue [08:23:42] no problem [09:08:06] hmm, Thumbor could work well with Varnish I guess [09:08:22] or rather, Apache Traffic Server [09:08:44] and the support for webp based on capabilities sounds nice too [09:14:08] Hi, i have a problem with the VisualEditor Extension in 1.35. When im creating pages i can use the VE Extension but if i want to edit them i get the error "Error contacting the Parsoid/RESTBase server: http-bad-status". Can somebody help me with this probem? [09:52:57] mschamber: have you used VisualEditor prior to 1.35? [10:35:12] If you have thoughts and opinions on finding technical documentation in Wikimedia: Your feedback is welcome on https://www.mediawiki.org/wiki/Developer_Advocacy/Developer_Portal/Content_Draft - thanks in advance! [12:06:18] Remilia No, i upgraded from 1.27 to 1.35 and then i activated VE [12:46:32] Hi all, I am looking for some support on ldap on mediawiki. I seem to be unable to get it working. In ldapprovider.json I add searchattribute: uid (and many other things). It is clear the login works (I get a different error when logging in with an incorrect password) but I get the error "Undefined index: uid in ...." [15:37:24] We have our own commons wiki, and a number of wikis that share content. When we update an item on the commons, the changes are not propagated to the other wikis. We suspect there is just some caching going on. Is there a simple way to clear the cache for one particular item, or how do we do that? The actual file we are trying to see is a .data [15:37:24] file with geojson code,, map polygons [23:14:22] Something is wrong: This diff https://develop.consumerium.org/w/index.php?title=Lists_of_price_comparison_services&diff=54504&oldid=54500 shows that the user replaced all content with "Testing", but in the RC it shows up as +85 bytes added and the page itself appears like nothing was removed. What's going on?