[06:30:17] hello, is it possible to test for user privilegies from a template ? [07:29:18] what are you trying to do? the real answer is no, but usually there's a workaround [07:46:43] legoktm: there a template wich should works only if it placed on some group of user pages. users from a group [07:47:50] some test if user from a group than show template, else show error [09:07:40] A wiki shows blank pages in the html. When I click 'edit' the source shows up just fine. [09:07:49] How do I troubleshoot this? [09:09:16] Also, it's mediawiki 1.19.1. I would like to update it. What is the best upgrade procedure? [17:02:16] random question about pywikibot: I have granted my bot the rights to delete pages etc. etc., but delete.py tells me "Can't delete [[en-gb:File:10790 skill.png]]; do you want to mark it for deletion instead?" [17:02:39] does the bot have to be in the administrators group too? [17:05:33] Remilia: grants cannot extend what rights that user account has [17:06:15] makes sense, thanks [17:06:29] if you are an admin yourself, you can configure pywikibot to use your account for admin actions, you can use grants there [17:06:49] your account with a bot password, I mean [17:10:40] tgr: I already added a bot user with administrator permissions but apparently the problem is that it tries to log in with the wrong credentials [17:11:22] I deleted user-config/user-password files and tried to create again, but filling the fields as instructed by the prompts results in [17:11:46] pywikibot.exceptions.NoUsername: Username "Yuubari@Yuubari@Kalina" does not have read permissions [17:12:23] I am guessing the "Botpassword" username should not be used as displayed on the botpasswords page? [17:14:03] oh [17:14:44] got it, thanks [17:15:34] login worked, delete still refuses to delete things, time to dig deeper :\ [17:18:11] tgr: https://paste.ee/p/sftI0 <- does it try to delete without logging in first, or am I missing something? :\ [17:21:05] oh [17:21:14] thanks to T206432 [17:21:15] T206432: delete.py does not work on non WMF wikis - https://phabricator.wikimedia.org/T206432 [17:37:44] heya. is there any way to force content into a single line, regardless of newlines that appear in markup? something like a parser tag that turns all newlines within into spaces? [17:39:53] why would you want that? [17:41:29] andre__: I'm creating alternatives to Wikipedia's cite templates, using only parser functions. having tons of nested {{#if: {{{foo|}}} | ... }} on one line is extremely unreadable. [17:41:50] Nasty [17:41:50] not even necessarily nested, just one after another. [17:42:02] You realise we moved away from those... Because they're not good? [17:42:41] I don't want to customize the installation too heavily. are there other alternatives? [17:43:02] We try to use scribunto (ie lua) for complex stuff now [17:45:04] looks like a lot of effort to install, configure, and maintain that. {{#if:}} works just fine, except for the newline issue. [17:45:25] feels like I'd be shooting cannonballs at sparrows [17:46:23] it really shouldn't be much to install [17:46:29] Almost nothing to configure [17:46:37] And maintaining? It's just another MW extension [17:46:58] and the scripts for citations? [17:48:16] I mean I won't automatically get those when I install scribunto, will I? [17:48:28] No, but you can export them [17:48:49] Don't they require the Cite extension anyway? [17:49:39] Remilia: that task seems like user confusion [17:49:56] pywikibot does not have much special casing for WMF wikis [17:50:32] tgr: nevertheless it helped because without the sysopnames line it would not delete [17:50:42] and that is not mentioned in the documentation [17:51:36] Remilia: yeah, if you want to use it for your sysop account, you need to set username and sysopname both [17:51:54] probably mentioned somewhere but the documentation is a bit sprawling [17:52:10] btw there is a dedicated #pywikibot channel [17:54:04] taylan: people usually wrap newlines in [17:54:32] newlines + indenting [17:54:49] you can end up with almost-readable template code that way [17:55:02] almost-readable :) [17:56:03] would be so great if there was some tag like as many lines as you want go here and it just turns newlines into spaces :\ [17:57:03] you could write your own parserfunction to do it... [17:58:59] templates are amazing until your users start going to town with them and you end up with like 5 levels of transclusion and newbie contributors just drop their hands and go "I'm outta here" [17:59:12] maybe I'll write a little extension for it... will try the HTML comment variant now, maybe it'll be readable enough for my taste ^^ [17:59:13] tgr: oh, thanks [18:16:24] Remilia: templates are amazing until your users start getting creative. Scribunto was written as a desperation move when some people figured out how to do complicated string operations with #if and #lpad, and it started crushing the servers [18:16:58] tgr_: oh, my users are into Scribunto too and when you add in Cargo... [18:17:11] #date was written after someone figured out you can use a huge #switch with every single day between 1960 and 2050 in it to do date conversion... [18:17:12] wikitext has a fun history [18:17:23] you're shitting me :D [18:17:43] or at least, I hope you are [18:17:46] I can easily believe that [18:17:51] I have seen worse [18:20:40] Or they do stuff like https://fr.wikipedia.org/w/index.php?title=Mod%C3%A8le:Donn%C3%A9es_Rang1968&action=edit&oldid=122146427 [18:21:15] I'm actually quite content with this: https://gist.github.com/TaylanUB/739fd03337973d98e8865b8ccc72b8da [18:21:19] The easier way to reduce page load is to reduce template depth (from 10k) and page byte length (from 2M) [18:21:31] maybe it's because I'm used to programming in Lisp, lmao [18:22:18] now on to {{cite journal}}! [18:26:29] taylan: you might enjoy the Lisp parser written in Lua some parts of English Wikinews use for templating, because someone did not like the native wikitext template system [18:28:35] https://en.wikinews.org/wiki/Module:Wikilisp [23:07:34] hi everyone, I'm trying to upgrade to mediawiki 1.31 to 1.32. We use VisualEditor and local instance of restbase. After updating VE for 1.32, I can't load the page in VE. I'm getting a 500 error and error in restbase is "TypeError: Cannot read property 'headers' of undefined". I tried to update the restbase from 0.19 to 0.19.1/0.19.2/0.19.3/master. None of them works. Any advise? [23:07:39] I'm also having trouble to find information on which version of VE works with which version of restbase. [23:12:01] compass: any hints in the node output? [23:12:54] saper: "500: internal_error" TypeError: Cannot read property 'headers' of undefined". and the stack trace [23:13:35] can you post the stacktrace somewhere? [23:13:56] https://pastebin.com/ajZ8RiKw [23:14:49] (never ran restbase myself ...) [23:15:11] I would like to write an extension that allows to send a message to all users who are watching a page. The message should be delivered by the same way users are notified of new watchlist entries (echo, wiki talk, or emailuser). If I were to write something like this, what are your suggestions how to begin? [23:15:51] Also I have mediawiki 1.19, I would like to upgrade it to 1.32. I am not sure how to do this correctly. I would like to export all content to the new wiki. [23:16:05] compass: which version this was from? [23:16:06] You shouldn't need to do that for that upgrade [23:16:10] !upgrade [23:16:10] http://www.mediawiki.org/wiki/Manual:Upgrading [23:17:17] saper: MW1.32 and RestBase 0.19.0 [23:17:28] thanks, this code is gone in master [23:17:39] (or just moved) [23:18:46] Yes, I also tried master and got missing error. Restbase won't even start. [23:19:45] saper: it says it couldn't find "sys/multi_content_bucket.js". And it seems that file is removed in https://github.com/wikimedia/mediawiki-services-restbase/commit/de620a7f897a1f1e0840b009bb34293d11984b31 [23:20:27] do you have a full dump of a request that VE is sending to the restbase? [23:21:07] nope. any easy way I can get it? [23:23:23] i'll try ngrep it [23:25:55] saper: here you go: https://pastebin.com/dSDWN8WF [23:36:55] compass: is it trying to save a new revision when it dies? [23:38:24] no idea why it dies in putRevision... this get request is supposed to figure out the older revision and there isn't any (new page?) [23:38:26] saper: no. just trying to open the page using VE [23:38:46] sadly I need to log off :( [23:39:04] no problem. Thanks for your help [23:42:17] maybe observing some larger amount of traffic (you->VE; VE->RESTBASE) might give some clue... [23:43:05] Reedy, would the old database even be useful? It's so ancient that I think the database format has changed since then [23:46:30] compass: maybe you need to check your version of Parsoid, too [23:47:08] sveta: database migrations should handle your 1.19 format - backup everything (mediawiki directory, images, the database) and give it a try [23:47:26] saper, ok thanks [23:47:52] saper: will try.