[00:52:55] hi guys, i have a [http://www.mediawiki.org/ link] on a wikimedia wiki, but i'd like to make it look more like an action button. how can this be accomplished without javascript? also, how do i increase the spacing between table cells content and their boundary? [14:09:43] hi, on our internal wiki, we defined some extra groups. When having upgraded to 1.31.1 as burocrat I don't see the groups listed on Special:UserRights to manage [14:09:54] what did I miss [14:50:57] Will there be a way to create categories that don't exist with MassEditRegex? [14:59:11] akoopal: $wgAddGroups? [15:11:20] Reedy: found the issue, we use the lockdown extention, and we use the groups only there [15:11:34] # To define ssm and solaris [15:11:34] $wgGroupPermissions['ssm']['read'] = true; [15:11:34] $wgGroupPermissions['solaris']['read'] = true; [15:11:37] solved it [15:17:13] as we didn't give the groups any other rights, only via the lockdown, the groups were not defined. Although lockdown did it's work [15:23:41] something about memcached (not 100% sure but for now seems very likely) as the object / parser cache might be weird in 1.32.0 [15:24:13] * Reedy looks for context [15:24:44] no context, I am beyond stumped by this [15:25:09] You've not said enough for anyone to even begin to help you [15:25:36] yeah because I was typing [15:25:56] using Varnish and sometimes after a template is edited, certain users (not all, and logged in users are affected as well) will get pages with "Thumbnail generation failed. File missing" in place of absolutely and definitely existing files [15:27:11] I am guessing the split is because of Vary headers and different copies being kept in the Varnish cache, but the source of the issue seems to be memcached as since I changed the cache to APCu 2 days ago, no one complained yet [15:31:44] here is what they see (and I was able to get the same result a few times) https://cdn.discordapp.com/attachments/233983799183147010/570284058085425165/image0.jpg — purging fixes this, but one template edit affects 300+ pages. Varnish restart does not fix this, however restarting memcached and Varnish together did seem to [15:35:30] and I cannot find anything criminal in the logs so far [18:02:09] Will there be a way to create categories that don't exist with MassEditRegex? [18:33:51] Hispano76: Are you asking if there is currently? Or if there ever will be? Or if one could be added? [18:35:37] Reedy: I ask if there is a way, with the current version [18:35:59] I guess you can add categories that don't exist in the same way you add categories that do exist [18:36:08] You just need to create the Category pages manually [18:37:40] but it's more than 100. :( Example: https://es.wikipedia.org/wiki/Categor%C3%ADa:Nacidos_por_a%C3%B1o Reedy [19:25:38] How do I set the title for an extension's special page, as seen in "Special pages". I thought in the SpecialPage's execute(), after $out is defined I could use $out->setPageTitle("TITLE"); [19:36:18] Abulafia: You give the name in the constructor, i.e. call parent::__construct( 'Foo' ). This is the used as an i18n key to look up the localized version. I.e. you should also set up localization and define a message 'foo'. [19:45:34] To confirm: I have parent::__construct( 'FeedbackAssign' ); on the special page code, and my i18n/en.json has "feedbackassign": "Feedback Admin - Assign Watchers" ... that should do it? Currently it's just giving "feedbackassign" [19:51:38] Abulafia: I would expect so. Could be I missed something. I had difficulties getting the message cache flushed in the past. I'd probably try ?uselang=qqx on the URL next. [20:17:54] Abulafia: after changing i18n/en.json you may rebuild the localization cache to see the effect (and, in some cases, clear other caches, but probably not in this case) [20:18:18] Abulafia: > php maintenance/rebuildLocalisationCache.php [20:19:45] Abulafia: ...if aou are impatient, add --lang en [20:25:52] I have a little question. Now we can get html content of a page using this variable "?action=parse". But if I make a few modifications to that html code, can I edit to an article with HTML code using an API? [20:26:39] I mean ?action=parse API get the content with HTML, Is there a way to make edit with HTML code? [20:27:57] using VE and it round tripping via parsoid... [20:28:57] Reedy: Is there an API for it? [20:29:03] VE has one, yes [20:29:49] Great!. Could you please give me the URL? [20:30:19] https://en.wikipedia.org/w/api.php?action=help&modules=visualeditoredit [20:34:22] Many thanks Reeady. I just need a small help. Now if I have this [20:34:48] https://ar.wikipedia.org/w/api.php?action=parse&page=%D8%A7%D9%84%D8%AE%D9%8A%D8%B1%20%D8%A7%D9%84%D8%B1%D9%88%D9%85%D8%A7%D9%86%D9%8A&format=xml [20:35:56] I tried to remove an element, and when I make the edit it gives me this error [20:35:56] https://ar.wikipedia.org/w/index.php?title=%D8%A7%D9%84%D8%AE%D9%8A%D8%B1_%D8%A7%D9%84%D8%B1%D9%88%D9%85%D8%A7%D9%86%D9%8A&diff=prev&oldid=34829935 [20:36:42] I parse the html code from this link https://ar.wikipedia.org/w/api.php?action=parse&page=%D8%A7%D9%84%D8%AE%D9%8A%D8%B1%20%D8%A7%D9%84%D8%B1%D9%88%D9%85%D8%A7%D9%86%D9%8A&format=xml [20:37:27] What action=parse will include a lot more than just what's in the wikitext box [20:38:44] So how can I get the html code that match the wikitext box?. Is there another API for it :) ? [20:40:37] What does https://en.wikipedia.org/w/api.php?action=help&modules=visualeditor give you? [20:40:42] Anyone know how to make a wikibreak enofrcer style script with a Start and End date? I've tried https://deployment.wikimedia.beta.wmflabs.org/wiki/User:Rhinosf1/common.js but nothing happens [20:49:44] Reedy: See this: https://ar.wikipedia.org//w/api.php?action=visualeditor&format=jsonfm&page=%D8%A7%D9%84%D8%AE%D9%8A%D8%B1%20%D8%A7%D9%84%D8%B1%D9%88%D9%85%D8%A7%D9%86%D9%8A&paction=parse&pst=1&utf8=1 [20:51:58] Oh sorry. I was looking for the attributes of the images. And now I find it. [20:53:30] I'll make a test now to check it. [20:58:56] Reedy: Works like magic. Many thanks!. [21:03:56] I'm planning to use this feature to easily remove red images from the articles. All you have to do is detect html element that contains specific word, then remove. Instead of the traditional way which was very hard to deal with. [21:09:30] RhinosF1: What's the problem with that code?. I see it works with me. [21:09:49] Asammour, doesn't execute for me [21:10:15] Asammour, What are you testing on? [21:13:49] RhinosF1: I believe the problem is with this line [21:13:51] if (currentDate <= enforcedBreakEnd) AND (currentDate >= enforcedBreakStart) { [21:13:57] Change it with [21:14:08] if (currentDate <= enforcedBreakEnd && currentDate >= enforcedBreakStart) { [21:14:43] And it will works now. Don't forget to change the values of the date, and time. [21:17:28] Hello, Mediawiki support. I need a little bit of installation help which is apparently outside the bounds of LTS, but is probably more of a simple mistake than anything else. [21:19:01] Thenomain: could you provide more details? [21:19:03] I was manually moving an old MW2.12 setup to a new server and I'm getting the white screen. I downloaded the version we were using at the time (2.12) and was still getting a white screen on the setup. mw-config/index.php gives me the following PHP error: [21:19:05] Fatal error: Uncaught TypeError: Argument 1 passed to MWExceptionHandler::report() must be an instance of Exception, instance of Error given, called in /var/www/html/includes/Exception.php on line 678 and defined in /var/www/html/includes/Exception.php:598 Stack trace: #0 /var/www/html/includes/Exception.php(678): MWExceptionHandler::report(Object(Error)) #1 [internal function]: MWExceptionHandler::handle(Object(Error)) #2 {main} [21:19:07] Asammour, fixed, it uses your local time as well [21:19:14] not server time [21:19:35] Thenomain: 2.12 isn't a MediaWiki version [21:20:01] RhinosF1: Of course it will use the local time, since JavaScript run on client side. [21:20:08] Pardon. 1.21. [21:20:32] ASammour, I was using sever time as well which didn't help [21:20:35] 1.22 [21:20:56] Thenomain: you're going to have issues with PHP versions. 1.22 doesn't support PHP 7, whereas the current LTS 1.31 doesn't support PHP 5 [21:21:29] That would be it, Skizzerz. [21:21:41] (assuming you mean to upgrade from 1.22 to current LTS or current stable) [21:22:39] That was the idea, Skizzerz. It's a solid answer, though. [21:22:53] if you're looking to upgrade, you could just use a fresh copy of 1.31 or 1.32 (depending on your taste). It will be able to see your existing database and upgrade it without issue [21:23:04] no need to put on the 1.22 files first [21:23:29] you'll then need to look into grabbing updated versions of all extensions you are using as well [21:23:30] So I can load the files into mySQL and load up 1.32? [21:23:34] (as always, take a backup before upgrading) [21:23:37] yep [21:23:59] No need to re-load images? That's pretty slick. [21:24:10] you need to put them in place on disk [21:24:25] you'll need to transfer the images in place on disk after grabbing the fresh mediawiki copy (into your images/ directory) [21:24:25] Before or after re-loading the database? [21:24:30] either [21:24:35] before would be best [21:24:57] Any other folders that should be moved into the new install? [21:25:31] it'd go something like 1. Grab fresh 1.32 tarball and extract to a clean (empty) folder, 2. Move over your images folder, 4. Load your db dump into mysql 5. Go to the web installer and point it at your existing database [21:26:14] you'll want to make a note of what customizations you made in LocalSettings.php on your old install and what extensions you had installed, but don't move either of those over (imo it's better to generate a fresh LocalSettings from the installer and then port over your customizations to that file) [21:26:15] That's what I was imagining, but you typed that out before I did. I'm not sure if we have a local css file; is that in the db or on disk? [21:26:31] ASammour, Do magic words work on .js page? How could you get it to always use current month? [21:26:32] were you using a custom skin? [21:26:33] I will be keeping the old structure in a different folder thorugh this, yes. [21:26:36] We were. [21:26:54] then that would need to be copied over as well. And will almost certainly need to be rewritten for compatibility with 1.32 [21:27:42] (you can try it out first to see though; there's a chance if it's simple enough that it'll work as-is) [21:28:14] RhinosF1: No. Magic words are identified by server. Could you please what do you mean by "use current month"? [21:28:59] ASammour, So where {{CURRENTMONTH1}} is now I want it to use the unpadded number for the month so 4 currently [21:29:52] Will give it a shot, Skizzerz and Reedy. Thank you both. I'll be excited like a nerd on GoT-Day if this works this easily. [21:29:57] Or...at all, really. [21:30:04] for reference reading.. [21:30:05] !backup [21:30:05] See http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki for information about backing up your wiki. For restoring your wiki, see http://www.mediawiki.org/wiki/Manual:Moving_a_wiki#Import_the_database_backup for more. If you don't have database access, try !grabber. [21:30:08] !upgrade [21:30:08] http://www.mediawiki.org/wiki/Manual:Upgrading [21:30:42] custom skins and if you have lots of extensions will likely be the most challenging part of this (some extensions may not have been updated to recent mediawiki and would need to be abandoned, updated, or replacements found) [21:30:42] Thanks. This db was never really meant to be read ever again. Then the people involved with it said, "Hey, Theno, can you pull up all the old information?" [21:31:01] We didn't use anything more impressive than DPL. [21:31:12] And yes, the modern DPL. [21:35:19] RhinosF1: Very sorry, but still I didn't understand your point :). Do you mean you need the script start from the begin of month? [21:36:37] ASammour, No, So If you look in the code where I have {{CURRENTMONTH1}} that should show as 4 in may, 3 in april, 5 in june, 10 in october and change automatically [21:39:29] RhinosF1: Ah!. You need just to replace {{CURRENTMONTH1}} with (new Date().getMonth())+1 [21:40:01] This will get the current month automatically. [21:40:55] testing that now.......... [21:41:27] Asammour, :-) perfect [21:41:54] 👍 [21:59:13] I'm at the part of the 1.22 -> 1.32 update/installation. The system says, "If you want to regenerate your LocalSettings.php file, click the button below. This is not recommended unless you are having problems with your wiki." But it's advised that I do this, and move over tweaks manually? [22:00:42] I tend to prefer regenerating it if you're updating from a really old version because things changed enough since then [22:00:54] There's definitely some cruft that has been removed in more recent versions [22:01:03] Fair. [22:02:36] I cannot remember the main namespace. Is this going to be an issue? [22:02:48] ? [22:02:55] the main namespace doesn't have a name [22:02:56] Special:AllPages [22:03:38] There's no wiki yet. This is part of LocalSettings setup. "Project namespace: " [22:04:19] oh, you can put whatever there, and can always change it later once you know what it should be. The default is *usually* correct [22:04:30] project isn't the main namespace [22:04:38] It's like the "Wikipedia" namespace [22:05:20] I can't remember what the name of the project name originally was. >.> [22:06:50] It'll be in your LocalSettings.php [22:07:03] Usually, the same as $wgSitename [22:07:16] Sitename? Ahha, thanks. [22:10:43] And of course I can't remember the administrator name/pass. Will update manually later. [22:13:13] Tho isn't this already set up? Let me try to skip creating the admin account. [22:15:08] No can do. Hm. [22:26:32] Thenomain: Has it not found your db? [22:30:33] Reedy: No, it found it, but part of the upgrade seems to be "make a wiki administrator". I don't think it actually touched the db. Doesn't look like it. [22:30:41] Not wiki_users, at least. [22:32:32] Is the wiki working? [22:33:41] Not there yet. Tweaking LocalSettings. [22:33:59] the upgrader won't make an admin user, only a fresh install will. If you don't recall any admin credentials you can run a maintenance script createAndPromote.php to either give access to an existing account or create a new account with access [22:34:01] Turns out the most complex thing we really did was use the 'News:' namespace for our own nefarious purposes. [22:34:23] In retrospect, not a brilliant idea. [22:34:34] Why? [22:34:39] It's not difficult to add namespaces [22:35:12] Because I wanted to use the word 'News' for some external code that talked to the wiki. Like I said, not a great idea. [22:35:41] If you understand the context: This is a Wiki for a TinyMUSH. [22:36:04] If not, the answer was "it seemed like a good idea at the time". We have other namespaces, I just wanted "Help" and "News". [22:37:51] Not sure I follow [22:38:16] I have a news system from inside a Mud-like game that pulls from MW. [22:38:29] I wanted to use the 'Help:' and 'News:' namespaces. [22:38:56] News was a bit of a problem because, from my notes, "$wgUrlProtocols (in DefaultSettings.php) defines 'news:' as a URI." [22:39:17] there's no conflicts there [22:39:19] ah, nntp [22:39:25] (usenet) [22:39:34] Yup. [22:39:49] So I do this: $news_key = array_search( 'news:', $wgUrlProtocols ); unset( $wgUrlProtocols[$news_key] ); [22:39:59] Going to check if that's still a problem. [22:40:20] an internal link [[News:Something]] is unambiguously the wiki page, whereas an external link [news:something] (or a bare news:something) would be an external link [22:41:34] Ah, that's what you mean by 'unambiguous'. [22:41:47] Will note this in LocalSettings and comment it out, then. [22:43:05] hmm, actually, looks like this bug is still open: https://phabricator.wikimedia.org/T46011 [22:43:24] so you may have issues still [22:44:45] That looks like an upgrade issue which will come out differently than the internal/external problem I was possibly having. [22:45:07] Finally: What's a good user/group for MediaWiki these days? It looks like 'www-user' is something I can do (Ubuntu). [22:48:12] should be good [22:55:25] Okay. LocalSettings.php in, set 660, all files chowned 'www-data:www-data', web page loaded up, aaaaand... "LocalSettings.php not readable" [22:57:12] `service apache2 restart`. Cool. ... "Fatal error: Unknown: Failed opening required '/var/www/html/index.php' (include_path='.:/usr/share/php') in Unknown on line 0" [22:57:39] Because it's Write-Only...what? [22:58:10] Pardon me as I babble and sigh. [23:00:18] Yes, I'm now going to the "if you used git you may have wrong permissions" instructions. [23:02:50] And it worked. And now it's all about the skin. Did I mention a few dozen times 'thank you for all this help'? Because ditto-marks. [23:13:33] >> `[48d626d44aea37aedb0e5318] 2019-04-29 23:13:01: Fatal exception of type "Error"` [23:13:52] But at least this is from inside MediaWiki. I'll call this an improvement. [23:13:56] heh [23:14:01] !debug [23:14:01] 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 [23:14:36] I looked at "how to debug" and kind of glossed over, but since I'm heading out I will bookmark these in the project file and get back to them soon. [23:14:59] few statements to dump in localsettings usually is enough [23:15:37] It's where I started when I was getting the PHP errors, yeah. I'll assuredly be back. [23:16:04] It'll probably be something relatively simple [23:18:51] Probably. You were right about the Skin. That's a pretty major shift between 1.2 and 1.3. [23:20:26] Ta! [23:22:03] it's almost like we've done it before ;p