[00:00:05] MediaWikiServices::getInstance()->getDBLoadBalancer()->getMaintenanceConnectionRef( DB_REPLICA ) [00:00:08] Something along those lines [00:00:17] Yikes, seems really wordy [00:00:32] It depends what you're doing and where [00:00:42] There might be other ways to get a db object [00:45:25] I'm still running into some errors here. https://pastebin.com/2jWy8Fxs This is the extension's main php file. I changed DB_SLAVE to DB_REPLICA, but I suspect that the way he was doing probably doesn't work anymore due to changes to the core. Maybe I could get some insight? [00:46:21] what's the error message? [00:46:42] you're missing a space after "class" on line 10 [00:47:27] And a couple of other things... [00:47:29] That must've been a copy/paste error. Space is there on prod. One sec and I'll pull the error [00:47:31] You don't need the trailing ?> [00:47:35] $dbr =& wfGetDB(DB_REPLICA); [00:47:37] You don't need the & [00:48:19] Yeah I wondered about that myself [00:48:24] Why assign by reference? [00:48:39] It didn't really make sense in this context, but I figured maybe I just didn't understand [00:50:24] https://pastebin.com/pUtpa2v1 This is the error I got [00:50:46] that's not related to that code.. [00:52:02] So... any ideas what it might be related to then? [00:52:37] I do not understand anything about the class he extended [00:53:56] (the & is left over from PHP 4) [00:54:03] Does pear/net_socket/Net/Socket.php exist in your vendor? [00:54:50] I'd also suggest enabling the settings on https://www.mediawiki.org/wiki/Manual:How_to_debug so we get longer stack traces, [00:57:57] That file does indeed exist, Reedy [00:58:15] Also, I notice that the account I was trying to create was created successfully [00:58:18] Despite getting a 500 [00:58:32] it probably failed trying to send an email to it down the way [00:58:42] That actually makes sense [00:58:55] This particular test install isn't pointed at any SMTP server, I don't think [00:59:08] that shouldn't have caused that error though [01:00:29] Maybe the vendor directories need updating? [01:00:58] depends on your setup, but if you haven't since changing branches, it's likely [01:02:35] Those are done via composer, right? [01:04:46] What is your actual setup? [01:04:52] Are you using tarballs, or git repo? [01:14:16] tarballs. I took this job about a month ago and there's an insane amount of technical debt. They don't use a VCS, they have uncommented custom extensions, they added in ads and skin customizations by modifying core files... It's a nightmare. Right now, I need this to work with the upgrade, then I plan on setting up a vcs (probably git) [01:14:54] I was meaning are you using our git repo [01:15:09] So... if you're using the tarball, unless you've modified it, the vendor folder should've been correct for MW core [01:15:15] Well I'm downloading the releases from there [01:15:28] But not with git clone [01:15:45] I've been downloading onto my comp then uploading to the server [01:28:19] As legoktm said above, you might want to enable some more debugign stuff too [01:43:46] Yeah I think I'll try that. [06:53:19] Hi, I want to expose my wiki users a template that will show a given (parameter) text and caption inside a specially div with css class, lets call it colorfull textbox. [06:54:07] I've done that in the naive way, but i got some problems, the text the i send (As paramter) to the colorfull textbox cant start with "=" or "#" so i cant write headers and list. [06:55:01] I saw that this is a general problem with passing parameters, So i wanted to ask here - Someone knows a solution to what i described? (maybe template is not the right approch?) thank you! [07:12:01] What this syntax means? {| or |} [07:15:07] Nik14: that's a table [07:18:49] I saw a template on the global wikipedia that uses this "trick" in order to show "#" and "=" in the right way, How that solves that? [07:26:33] how to manually add images to mw ? [07:26:51] i cannot use upload option, so i copied images to /images dir [07:26:56] but i cannot use them from wiki [07:38:21] any way to display image from a link ? [07:38:28] like imgur.com/jsdkadjakd [07:40:02] synaps3: you still need to import the images if you put them in the uploads folder - https://www.mediawiki.org/wiki/Manual:ImportImages.php [07:41:06] thank you so much p858snake [07:41:35] if you want external images https://www.mediawiki.org/wiki/Manual:$wgAllowExternalImages [07:43:04] thanks [14:47:54] Hello and thanks for the awesome software. I have a weird situation, probably a bad situation. Accounts are request only (checked with non-logged in browers, the "request account" is in the top-right), yet I notice 6 accounts having been created. There isn't supposed to be any other method to create accounts except to request one from me [14:48:38] Are registered users allowed to create other accounts? [14:48:42] For context: I did 1.34.2 -> 1.35 upgrade on Monday [14:49:00] Reedy: I'm not sure. Where do I check? [14:49:22] either your local settings.. or Special:ListGroupRights [14:49:24] I have not set that [14:51:00] Reedy: Special:ListGroupRights In I see "Group all -> create account". I want to revert to post upgrade backup and change this setting [14:51:22] The place had a spammer problem back in the day [14:52:01] Am I making the right assumption that it is one or more of the existing accounts that have added the 6 new accounts? [14:52:03] This is basically T263920 [14:52:04] T263920: The createaccount permission is not revoked properly when using extension registration - https://phabricator.wikimedia.org/T263920 [14:52:51] It is mentioned in https://www.mediawiki.org/wiki/Extension:ConfirmAccount#Installation too (though, maybe not the most obvious) [14:54:37] Reedy: Thanks. That would seem to be the solution to "$wgGroupPermissions['*']['createaccount'] = false;". I'm assuming I can override this setting so I can create accounts, should someone else also care about the future of humanity [14:54:48] Yeah [14:55:00] You can then do something like $wgGroupPermissions['sysop']['createaccount'] = true; [14:55:53] Just 6 accounts created. No edits, so I just load the 2 days old backup into MySQL, no need to extract the /var/www/sitename [14:57:04] this is gonna be 5 minutes to fix with this information. Thanks again Reedy. You're the champ. [15:04:56] sorted. so was a 7 minute thing [15:06:20] needed to dump the right database from the database dump validity checking place somewhere in the EU and do the other steps. Now the spammer / up-to-no-gooder accounts have vanished and I applied those two lines you gave me Reedy [15:09:09] Ok. SSF! wiki was not the only one hit with this vulnerability Consumerium's development wiki is full of Viagra [15:10:24] But no non-spam edits, so I'ma just dump the 2 days old backup from backup server and upload... actually fix the vulnerability first, then revert database [15:10:41] * twojukeboksi goes to brew coffee [15:21:27] twojukeboksi: you may want to have a look at the Nuke extension [15:21:56] looking [15:22:01] I'm probably not the only one in here who would like an induction powered stay-hot coffee mug [15:23:40] thank you duesen. noted for any future needs, but this we can deal with brute database upload. zero losses [15:23:59] cheers! [15:38:46] ok. all wikis secured against normal "users" creating more users and spam gone with mysqldump from the database dump verification and stashing place. y'all are awesome [15:43:25] I've been upgrading Consumerium's developement wiki since March 2003 :D :D Once one has upgraded a complex software for 17.5 yrs and it just works unless I've messed something up, one is like "This is a hiiiiiiigh quality piece of applicataion of the arts and sciences of software engineering" [15:49:14] you've had better luck than I have then :) I still clone it off to a spare box and upgrade it several times over before I clench and push it live [15:50:59] Shaun: your method is more pro [15:51:21] I could do it by spinning a new server from an image of the system disk of the VPS [15:51:35] more "once bitten twice shy". I keep hitting weird edges upgrading [15:52:15] I'm at this German hosting company that got data center in Finland, whose pricing policy for snapshots is really consumer-friendly: 0.01€ / GB / Month + VAT [15:53:13] seriously 1.24 eurocents for safekeeping of 1GB of snapshot for one month, ready at all times for recovery, wow [16:02:09] yes Germany has crazy good prices. I know of a few people here on the eastcoast that use german servers, for personal use, 1tb is like 10 euro or something cheap like that [16:06:51] I got a 8GB, 4 core, 200GB SSD VPS at a ground water heat exchanger equipped data centre in Bavaria ... for 5€ / month ... VAT incl. [16:07:17] But I think I'm moving that to this better and more expensive provider that I go the "important" stuff hosted with [16:07:31] hi peoples, any pointers on a hook for when the Setup.php has done its thing? I want to check if user is logged or not and then do a bunch of stuff on a extension [18:15:40] how do I transclude a template from a parser function, with custom arguments? [18:17:53] i can do $frame->newChild and $parser->fetchTemplate and $frame->expand($dom) [18:18:25] but i don't know how to set the args from my own values [19:51:09] MW 1:35 Heavy WP template use. Is there a way to cache in laymans terms or things which might speed up things? An average wait time is 20 seconds for a page load. Thx [19:51:30] Small or large page is irrespective [19:58:03] !performance [19:58:03] [19:58:09] Caching is probably the answer [20:00:25] reading now thx [20:11:53] Wow! Nuts with just a few changes. Is the concept that as soon as I view a page it caches it and thus is faster and does this apply to anyone say viewing that page? thx [20:12:40] Basically, yes [20:13:54] Cool! Thanks! [20:40:39] MW 1.35: Coordinates work at top of page but not internally on WP Template:Infobox settlement. Generates: Fatal error: The format of the coordinate could not be determined. Parsing failed. [20:41:04] Everything else works fine. Read somewhere that WP does not use the Maps extension? [20:41:54] https://digitalmatrixgroup.com/index.php/Birmingham,_Alabama [20:45:38] Looks like this piece: {{coord|33|31|07|N|86|48|37|W|region:US-AL|display=inline,title}} is the issue. Coords appear at the top right of the Infobox but not inline [21:59:26] foreclosurepedia: https://www.mediawiki.org/wiki/Manual:Performance_tuning [21:59:33] might have some more up to date stuff [22:06:26] Thanks @krinkle So far the tweaks have been INCREDIBLE but I am a pretty small MW [22:32:59] Hello all, hope everyone is doing well. Quick question. Is there a tool to sync the articles in a mediawiki installation to files on local computer? [22:35:07] As an example: I would like to download all of my pages as text in a directory. Edit them, create new pages, etc locally then push my changes up to my mediawiki on my server. [22:39:00] We have a maintenance script for importing text files... [22:40:06] oh.. [22:40:54] There was a feature for "offline editing" like that before, but it was removed a long time ago [22:41:53] I see... gosh, would be so useful to be able to work on my articles via vim or something... [22:42:30] I mean, https://github.com/m-pilia/vim-mediawiki does exist [22:42:31] humm... maybe I can find a VIM plugin to edit the wiki... [22:43:06] Awesome! I'll give that a try [22:45:01] The Asynchronous Wikis thing sounds interesting. https://www.mediawiki.org/wiki/Asynchronous_Wikis [23:32:32] heya, I'm trying to sort out some SMTP configuration. Wiki says the settings are stored in an array in $wgSMTP [23:32:45] is this in the LocalSettings.php file in my mediawiki directory? [23:33:18] because I looked in there and was unable to find any note of "$wgSMTP" [23:36:05] Yes, you would put the config in wgSMTP [23:36:10] in LocalSettings [23:37:15] ah thanks, so I'm guessing it's normal for it not to be in the file by default? the array I mean [23:37:52] Indeed [23:37:56] Most of them aren't in there [23:38:06] thx. Just wanted to make sure