[08:34:49] t [08:34:53] hello [08:35:20] I have been trying to port content from a website into a mediawiki installation and wanted to cut and paste with the images also. I installed TinyMCE but I can never get past the error saying you can't have external images [08:35:33] I added this [08:35:35] wfLoadExtension( 'TinyMCE' ); [08:35:35] $wgTinyMCEEnabled = true; [08:35:35] $wgAllowExternalImages = true; [08:35:35] $wgEnableUploads = true; [08:35:37] Still get it [08:42:06] qomp: external images means you put the URL of an external image (ending in a known/supported image format like .png, .jpg...) and it will displayed directly on the page. Without tag or [[File:]] syntax [08:43:12] if the pasted content gets interpreted as tags, setting this to true may help, although it's deprecated and you should replace them eventually https://www.mediawiki.org/wiki/Manual:$wgAllowImageTag [08:43:42] so just paste the link? [08:45:34] I still get the same error [08:45:44] The image appears in the text editor field but when I save it I get the error and it doesn't appear on the frontend page [08:52:07] I have never seen an error saying "you can't have external images". When external images are not allowed, the URL is displayed as plain text, without any error message [08:54:34] Maybe it's just TinyMCE being unhelpful [09:18:24] I tried doing it with tinyMCE disabled again too [09:18:59] The exact error is 'I'm sorry, you have encountered an error trying to upload to this wiki : Upload by URL disabled. Please reload the page and try again [09:20:31] $wgAllowExternalImages = true; [09:20:31] $wgEnableUploads = true; [09:20:35] idk how that's the case with these [09:46:30] qomp: look at https://www.mediawiki.org/wiki/Manual:$wgAllowCopyUploads for enabling upload by URL [11:07:18] Hi everyone! Any expert for extending Parsoid and VisualEditor around? In an extension, I'd like to add some new wikitext markup/syntax (no magic word) and have some questions. [11:32:39] I might have found what I was looking for: "ParsoidModules" in "extension.json" looks promising [11:33:36] new syntax outside of parser functions or tags? You probably shouldn't do that [15:35:13] I am having trouble with SyntaxHighligh_geshi extension. [15:36:31] I am running mediawiki 1.37 on rocky, and the extension is installed, but tags are not producing highlighted syntax, whether I specify lang="python", csharp, etc. [15:36:48] Just plain, like a pre tag. [15:37:27] I looked a little into what might be the issue and I figured, ah, maybe don't have python installed. Ran dnf install python39. [15:37:58] python3 -V works [15:38:24] But still not getting syntax highlighting [15:42:10] Set up a log file (https://www.mediawiki.org/wiki/Manual:$wgDebugLogFile) and try again. The resulting log should contain hints. [17:51:46] I'm seeing permission errors for syntax highlight but it's not clear where originating from https://pastebin.com/ubuX4nmD [17:52:12] That's a fragment from the debug log [17:53:28] I checked permissions in the extension directory and the SyntaxHighlight_geshi director, all directories apache user and group [17:54:04] jfaxdora: sounds like you fixed the permission step of https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Installation [18:00:25] Just went ahead an ran that chmod on that file, was excited that would fix it, but still not working and log appears to producing that error.. [18:18:20] jfaxdora: the errors are: ulimit: cpu time: cannot modify limit: Permission denied. This is not a filesystem permission issue (chmod). MediaWiki is trying to raise (or just set) the CPU and file size limits, but something in your server is denying it [20:12:57] put a patch up yesterday for a forgotten corner of MediaWiki wiki if anyone wants to review it https://gerrit.wikimedia.org/r/c/mediawiki/core/+/881031 [20:13:54] should be easy to review if that incentivizes anyone [20:38:16] Izno: did you test it? [20:38:31] oh, I should've kept reading [20:38:35] "Changes were tested in both the output of Special:ApiHelp as well as its transcluded version." [20:41:24] we need to add you to the CI approved list [20:46:25] Izno: stylelint has 2 errors for you https://integration.wikimedia.org/ci/job/mwgate-node14-docker/103548/console [20:48:38] Currently despairing my life. Still trying to figure out this syntaxhighlight_genshi issue, which might just be an operating system issue, as pointed earlier getting arcane `ulimit: file size: cannot modify limit: Permission denied` error. Don't know what kernel variable or config need to touch for that. [20:49:11] These azure cloud boxes my work gives me are no good. [20:50:54] legoktm, it's valid to ask that question, that's also why I included a comment in the commit message. :) [20:51:11] seeing as my first patch (this is #2) didn't work :) [20:51:29] I'll adjust for the others [20:52:06] had their been a patchdemo link attached I wouldn't have even asked :p [20:52:09] there* [20:58:34] jfaxdora: FWIW, and it probably won't fix your issue, but you're running an unsupported version of MW (1.37) [20:59:23] I've never heard of rocky... But there must be docs for changing ulimits defaults (or for RHEL which should work) [21:00:16] https://access.redhat.com/solutions/61334 [21:04:04] legoktm, should be adjusted, not sure if I actually fixed the end of source newline rule even though I added a newline? :) [21:04:50] Rocky linux is a community edition of red hat (ever since demiste of CentOS), and work is using it because am running oracle db for another application, and we run oracle cause pharmaceutical research corps are enslaved by them. Just explaining that just in cause anyone thinks I chose weird distro myself :P [21:06:38] Have had a look at that doc and put in an entry that about reads: apache hard cpu unlimited [21:07:01] Who knows if "unlimited" is even an valid value, but still haven't got anywhere with that. [21:15:26] I might've been going the problem wrong way round, the issue seems to be a mediawiki shell script actually calling a command (in fact, a bash builtin) called `ulimit` and that's causing the error. [21:15:49] That, presumably the apache user, doesn't have permission to run. [21:19:08] if [ "$SB_FILE_SIZE_LIMIT" -gt 0 ]; then [21:19:08] ulimit -f "$SB_FILE_SIZE_LIMIT" [21:19:08] fi [21:19:36] if [ "$SB_CPU_LIMIT" -gt 0 ]; then [21:19:36] ulimit -t "$SB_CPU_LIMIT" [21:19:36] fi [21:19:40] ala /var/www/html/mediawiki/vendor/wikimedia/shellbox/src/Command/limit.sh [21:21:26] Yes! That's those are the lines I was looking at [21:21:47] Is this a command any user is meant to be able to run? [21:21:51] ulimit [21:22:24] it'll presumably depend on your OS's security model etc [21:29:41] jfaxdora: since it seems the script doesn't run the ulimit commands if the value is not greater than 0, try to set https://www.mediawiki.org/wiki/Manual:$wgMaxShellTime to 0 and also the related variables (in the "see also" section) [21:40:48] Okay, I added those variables, restarted httpd for good measure, and tried to save the page with syntax highlighting. No syntax highlighting still, but the debug log seems to no longer complain about ulimit. [21:41:08] https://pastebin.com/nZcQNtQV [21:41:27] Can swear pygmentize binary is chmod a+x [21:43:33] jfaxdora: check also selinux and other similar technologies [21:46:15] bowolff waaaaaw that did it [21:46:47] setenforce 0, straight away syntax highlighting tysm [21:47:15] SELinux ruining my life yet again [21:50:05] *bawolff [21:50:35] glad to help [22:09:05] Anyone want to add a note to this page how look out for SELinux in addition to chmod a+x pygmentize [22:09:06] https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Installation [22:09:20] Or mayb I should make account on this wiki [22:09:44] legoktm, :D [22:09:59] $wgGoogleAdSenseSlot = 'none'; // Slot ID for your AdSense script (example: 1234580893) [22:10:06] Is this outdated? What's a google adsense slot ID [22:11:46] https://www.mediawiki.org/wiki/Extension:Google_AdSense [22:11:48] I'm following this [22:12:58] Vulpix you sorted the image embedding issue thank you [22:13:26] yw :) [22:15:20] Any idea what I'm supposed to add for the Adsense code? [22:15:24] Izno: admittedly I spent more time looking to see if you'd made a core patch before than actually reviewing it :p [22:15:35] Could have just asked me :) [22:16:17] that's no fun [22:16:28] :P [22:19:36] Vulpix is there any way to make those embedded images responsive? On mobile they completely wreck the width [22:24:07] qomp: not an easy way. You'll have to add CSS to make them responsive. The TemplateStyles extension is recommended [22:28:04] good lord [22:28:08] Why is this thing acting like it's 1998 [22:29:47] Even urls that aren't line wrapping are breaking the width [22:29:51] because that's when CSS was invented :) [22:32:22] And the devs haven't updated it since? [22:34:07] Anyway, anyone know what the adsense extension is asking for? There's no such thing as a 'slot id' [22:34:25] Does timeless automatically make the images responsive? I kind of thought it did, but i might be wrong [22:34:43] I've resorted to making every image 640 width [22:34:53] How "responsive" things are will vary a lot depending on the skin (and also whether or not you are using mobile frontend) [22:34:54] which is garbage for desktop but at least fits mobile [22:35:03] I'm using the default skin [22:35:39] I don't even know which skin is the default one now. Is it vector-legacy or vector-2022 [22:35:46] bawolff, yes [22:35:51] and 2022 is default now [22:35:54] i have no idea i just didnt change anything [22:36:07] yes -> yes, Timeless does make images responsive [22:36:07] Izno: I mean, in mediawiki downloads, not on wikipedia :) [22:36:20] ohhh, no, there's a task to make 2022 default though I think [22:36:22] although maybe that's what you meant too [22:37:09] qomp: >(You can get your publisher ID and ad unit ID from the "Get code" page: Get and copy the ad code.) [22:37:18] at least I thought there was a task to make 2022 default :thinking: [22:37:22] I feel like it would kind of be rationale to have default mediawiki (tarball) skin not be default wikipedia, to help perserve the brand [22:37:32] https://phabricator.wikimedia.org/T301527 [22:37:34] since most people just use what is default [22:37:37] found it ~ [22:37:59] qomp: Anyways, seriously consider trying out the Timeless skin instead of the default (vector) [22:40:19] ok [22:40:21] I'll haev a look now [22:40:35] Where do you even change things like skins [22:41:30] https://www.mediawiki.org/wiki/Manual:Skin_configuration [22:41:34] During install you are usually given a choice. After install you can change it in LocalSettings.php [22:41:48] On a per-user basis you can change in Special:Preferences [22:42:16] T299080 this must be a joke [22:42:17] T299080: Third party Vector installs should look different from Wikimedia deployed - https://phabricator.wikimedia.org/T299080 [22:42:19] this skin isn't very aesthetic lol [22:43:10] Vulpix: eww that screenshot. [22:43:39] yes, that's the joke [22:44:46] Works a lot better on mobile than default though [22:46:42] Is it hard to change things like this Timeless skin from using shitty fonts like Times New Roman [22:47:15] !css [22:47:15] To change styles for your wiki, go to one of the MediaWiki:xxx.css wiki page (NOT a file) and put your custom styles there (sysop/admin rights required). MediaWiki:Common.css is for all skins and should be used for content styles. MediaWiki:Vector.css is for the Vector skin (default), etc. For more information, see !skins and https://www.mediawiki.org/wiki/Manual:Interface/CSS [22:47:43] ty [22:47:44] Don't 3rd parties need interface admin these days too, or is that just us plebs on WMF wikis? :) [22:48:01] Also, where can I manage user access? Currently guests can even edit anything. I just want a select few users that can edit and others can add comments on discussion page [22:48:25] also, "content styles" probably not quite the right framing now either since we have TemplateStyles [22:48:36] Izno: by default, the initial user would have interface-admin [22:48:43] qomp, https://www.mediawiki.org/wiki/Manual:User_rights [22:49:03] qomp: You should have been prompted about that during the install, but otherwise it can be changed in LocalSettings.php [22:49:04] This software ever thought of just making an admin panel [22:49:11] yes :) [22:49:34] Special:Specialpages [22:49:54] is this css thing int here [22:49:54] Or you can create your own by editing a page and add the most useful links [22:51:29] I can't work out how to access this css to change fonts [22:52:12] go to one of the MediaWiki:xxx.css wiki page (NOT a file)  [22:52:13] wat [22:52:22] The contents of the page named MediaWiki:Common.css is automatically included on all pages ( MediaWiki:Timeless.css if you want to be skin specific) [22:52:36] as part of the css [22:52:38] But how do I get to that if I'm not going directly to the file [22:52:45] I Want to change the site-wide font in the theme [22:52:48] Its a name of a page on your wiki [22:53:00] you can type it into the search bar [22:53:57] ok right *.com/index.php/MediaWiki:Common.css [22:53:58] When the help page says "not a file" they mean it is not a file on your server (e.g. not something you touch with ssh or ftp). It is a page on your wiki [22:54:03] yes [22:54:10] why didn't they just write that [22:54:22] If it's blank how do I know what css I'm trying to change [22:54:35] You need to read a full guide on every little step for this thing it's wild. [22:55:35] "How do I know" -> get familiar with your browser's console, accessible by F12 at a general level and right clicking on the element of interest and selecting Inspect element [22:55:40] I mean, its kind of assumed if you want to add CSS, that you know enough css to know what to add. Modifying CSS is considered an advanced thing [22:55:47] Also, ^ [22:56:28] Modifying css is easy, writing it from scratch isn't [22:56:46] If you just don't like the choices one skin makes, the easy solution is to just use a different one. [22:57:08] I tried this one because someone said it makes images responsive [22:58:48] Not sure why some genius made the title text Times New Roman [22:59:34] Lots of people like serif fonts [23:00:07] Comic Sans MS [23:00:13] Anyways, the css you probably want to change looks like [23:00:33] html .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6, .mw-body dt { font-family: 'Linux Libertine','Times New Roman','Liberation Serif','Nimbus Roman','Noto Serif','Times',serif; } [23:01:08] 1 moment [23:02:25] didn't seem to change [23:03:24] https://i.imgur.com/dcDp7JS.png [23:05:36] If you want people to help debug your custom css, you're going to have to link to your site [23:11:03] https://tinyurl.com/3zbdzep2 [23:12:40] qomp: Oh, i meant you should modify what i wrote to use the font you like. If you just paste exactly what i wrote, it would still just be overriding it to use Times new roman [23:13:21] As in, what i wrote is what Timeless's default is [23:13:46] oh right, I didnt check it [23:13:55] I wasn't sure [23:14:01] What is the body font atm? [23:14:24] I just want it that nice neat sans serif font [23:14:44] The body uses a directive of: [23:14:47] font-family: 'Segoe UI','Segoe UI Emoji','Segoe UI Symbol','Lato','Liberation Sans','Noto Sans','Helvetica Neue','Helvetica',sans-serif; [23:14:59] ok idk css enough for this one [23:15:11] I just updated the logo, how do you force a cache clear [23:29:03] bawolff do you know what css would change the times new roman to those more modern fonts is? [23:29:10] I just need the page title and section titles to change, everything else looks fine [23:29:46] html .mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6, .mw-body dt { font-family: 'Segoe UI','Segoe UI Emoji','Segoe UI Symbol','Lato','Liberation Sans','Noto Sans','Helvetica Neue','Helvetica',sans-serif;} [23:29:54] should do it [23:31:21] ty I'll add it and try now [23:32:02] Legend that worked [23:32:11] Any way to stop the text from hitting the lines [23:32:19] The g is landing ont he horizontal line [23:35:11] Oh the header? It doesn't for me but i suppose i have different fonts installed [23:35:54] I suppose you could experiment with adding a padding-bottom css rule or something [23:36:18] https://i.imgur.com/6THBUlB.png [23:55:23] :x [23:57:10] well, the g has some part of the glyph drawn below the baseline...