[04:22:32] hi all [05:49:45] @Axdr posted in Page language differs from the wiki language - https://discourse-mediawiki.wmflabs.org/t/page-language-differs-from-the-wiki-language/1103/1 [12:22:59] Yo. I have a question about templates. It's been years since I wikitexted... I got the template made, linking info from the template, but I forget how to make a second set of variables for the same template... only in a new row. http://poringop.shoutwiki.com/wiki/SwordsmanEquips <- Like for the next weapon [12:46:22] Basicallly to make something like this: http://www.tricksterlover.info/Bwiki/wiki.ggftw.com/trickster/Image_List_-_Weapon.html [13:04:06] Hi, I need help installing mediawiki through hostgator. Can anyone help me? Thanks [13:05:41] If anyone wants to actually install and set up my wiki - I'm willing to pay for your services. [13:06:21] O boy, it's been awhile, but you might try... logging into cpanel, and there should be a quick install script called Softaculous for x amount of different things (wiki, wordpress, etc) [13:09:30] I did that - it installs successfully but it's an older version of media wiki [13:09:58] and when I try to access my new page where I'd log in with my admin password it gives me an MW error [13:10:46] [8922f0e7] 2019-01-26 12:33:58: Fatal exception of type MWException [13:25:34] :( Im not sure then, sorry [13:41:30] Mattlas: making any progress? Have you looked into the mediawiki install docs? [13:43:01] well, I'm trying to upload the newest version of mediawiki through my ftp program, its 14K+ files so it's taking some time. [13:43:20] Also, I was suggested to install meza, which is super confusing. I am following the instructions but it appears to be hanging [13:58:57] Mattlas: what is your goal, are you trying to set up a wiki? Have you considered wikifarms? [13:59:52] to make a very basic wiki page [14:00:01] ive never heard of wikifarms [14:00:12] i tried tikiwiki and it very complicated [14:01:31] ATM im using shoutwiki, its very easy. [14:01:47] you dont have access to FTP, but you can support ticket some requests. [14:02:01] https://en.wikipedia.org/wiki/Comparison_of_wiki_hosting_services [14:02:28] shoutwiki has ads? [14:02:33] that's pretty bad [14:03:10] http://poringop.shoutwiki.com/wiki/Main_Page [14:03:21] i duno, i dontsee any but i have a basic ad blocker on [14:04:33] why would two people in the #mediawiki suggest me to go elsewhere [14:04:38] I find this very strange [14:05:10] I was here to get help since i havent wikitexted in years, but its 6am and noone is responding, lol. [14:05:28] Mattlas: mediawiki is just software [14:05:31] Ive only set up a wiki from cpanel once, and it was like 2008 [14:05:55] it doesn't seem like you would want to maintain something like that yourself [14:07:12] well, the idea of a wiki is you set it up, and everyone comes to add content on it [14:07:20] sounds pretty straightforward honestly. [14:08:00] Well I just suggested that there are other options, someone else taking care of the wiki software. You can also set a wiki up that way, it will be way easier [14:08:06] or metaphorically, I build the house properly, and then others live in. The wiki is the house, once you build it you don't need to keep building it. [14:08:38] so wiki hosting services [14:08:45] is someone taking care of my wiki? [14:09:58] the software [14:10:03] updates [14:10:06] security fixes [14:10:07] database [14:10:11] migrations [14:10:41] networking, domains, certificates [14:10:51] nah [14:10:53] First of all, I would wait till your 14k uploads then retry it... [14:10:55] im good. but thank you [14:11:28] Woooooooooooooooow. [14:11:39] hmm [14:11:49] why would he get offended about that [14:12:05] "Is someone taking care of my wiki?" [14:13:08] at 6am. Sure. let me drop everything and troubleshoot this for you when you wont even wait for the updates to upload, lolol [14:13:30] 4pm here :P [14:21:18] hey [14:21:49] when doing the mobile tests with the google lighthouse it complains a lot about PWA anyone knows any guidelines to surpass these issues? [15:08:58] is there an extension or user script to display refrences ({cite} templates, tags) in the paragraph itself rather than on References section? [16:48:23] hi [16:48:34] is this supported ? https://github.com/cmln/mw-scss [17:56:02] yo [17:56:11] i need help to write an article on my mediawiki [17:56:39] i need write this information on my article ----> {{#tag:console|{{{body}}}}}{{#if:{{{desc|}}}|'''Console: {{{desc|}}}}} [17:56:48] how to disable code, an write only this code? [17:56:54] and
 not work
[17:56:55] 	 :(
[17:57:02] 	 in text pure
[18:12:48] 	 i need write xml code on my mediawiki
[18:18:49] 	 xml?
[18:18:52] 	 yeap
[18:18:58] 	 or any code using < and > 
[18:18:59] 	 rs
[18:19:00] 	 kkkkk
[18:19:09] 	 if save article, dont show
[18:19:17] 	 you need to escape those characters perhaps
[18:19:21] 	 how?
[18:20:57] 	 https://www.mediawiki.org/wiki/Help:Formatting#Nowiki_for_HTML
[18:21:36] 	 harmaahylje, thanks
[18:23:14] 	 harmaahylje, how to escape char { ? kkkkkkkkk
[18:24:19] 	 {
[18:31:48] 	 harmaahylje, work!!!
[18:31:55] 	 from: {{#tag:console|{{{body}}}}}{{#if:{{{desc|}}}|'''Console: {{{desc|}}}}}
[18:31:57] 	 to: <includeonly>{{#tag:console{{!}}{{{body}}}}}{{#if:{{{desc{{!}}}}}{{!}}'''Console: {{{desc{{!}}}}}}}</includeonly>
[18:31:58] 	 :D
[18:32:02] 	 harmaahylje, sed :D
[18:32:05] 	 harmaahylje, thanks
[18:37:26] 	 ew
[18:37:37] 	 I'd recommend just using 
 or Extension:SyntaxHighlight
[18:41:12] 	 he says pre doesnt work
[18:42:50] 	 
 works for some things.
[18:43:04] 	 Sometimes you need to combine with  or similar.
[20:01:35] 	 Is there any way to add a simple counter to the bottom of pages for 1.31+, similar to how it used to be (i.e, ""This page has been accessed x times since y")? Or, is the only choice now to use the Google Analytics extension or similar?
[20:02:47] 	 https://www.mediawiki.org/wiki/Extension:HitCounters
[20:03:50] 	 andre__, I was nervous about that one with it saying it was no longer maintained and no update in nearly 4 years ....it's still good for the current versions of MediaWiki?
[20:06:18] 	 oh, and it also says on that page: "Currently it is only possible to migrate wikis using MW 1.25 to use this extension. A fresh install in MW 1.26 and higher is not possible!" ...I read that to mean that a fresh install of the extension into 1.26+ wouldn't work?
[20:06:41] 	 (it's somewhat of a confusing statement because it's not clear if they're referring to a fresh install of Mediawiki or a fresh install of the extension.)
[20:08:42] 	 I think it works
[20:09:00] 	 Mw 1.25 updater deletes data from older ver
[20:09:18] 	 So if you have fresh install its fine
[20:09:46] 	 I could just give it a try and see how it goes ...won't hurt anything to look at it ....thanks!
[20:33:23] 	 Anyone know if there's any way to use templates multiple times in the same page without having to just have a billion things defined Thing1: {{{Thing1}}} Thing2: {{{Thing2}}} etc?
[20:51:24] 	 hmm...I've installed the Widgets extension ...created the Widget:YouTube page ....but when I use the {widget...} code in a page, I get this internal error: [8dc7150a44791f821b4da2d1] 2019-01-26 20:49:49: Fatal exception of type "Error"
[20:54:33] 	 [exception] [aafba74dfd0427148c09d63b] /index.php?title=Test_Page&action=submit Error from line 24 of /var/www/www.windrep.org/htd
[20:54:34] 	 ocs/extensions/Widgets/WidgetRenderer.php: Class 'Smarty' not found
[20:54:54] 	 hmmm....I guess the widget installation instructions are missing something
[20:58:26] 	 ....yep, the installation instructions are incorrect ...1_31 needs to run the composer update --no-dev command as well ..not just 1_32+
[21:10:51] 	 Hi, I would like to login to my mediawiki using python. There was a nice working example described here: https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python   If you try to run the code today with mediawiki 1.32, I get "this method is deprecated" error. I tried this afternoon to update the code to work with mediawiki 1.32 but I didnt get it. Could someony pleasy provide a working example on how to login to mediawiki 
[21:10:52] 	 (BotPassword) using Python 
[21:12:48] 	 produnis: https://www.mediawiki.org/wiki/API:Edit#Sample_code is more official, I'd say
[21:13:20] 	 thx andre_ , ill try this
[21:17:00] 	 can I save this login-session into a cookie?
[21:19:46] 	 or in other words:  thx a lot, login works.  My question now is: if I try to read a page, how could I send my "session"?
[21:20:00] 	 using python requests
[21:24:34] 	 my script uses something like "mycontent = requests.get(command, cookies=r2.cookies)"
[21:24:58] 	 but that does not work with the new api as i dont know how to save the session into a cookie
[21:25:46] 	 (command holds the API url, like "action=query&format=json&list=categorymembers&cmlimit=500&cmtitle=Kategorie:Hauptkategorie")
[21:30:10] 	 this is how I did it with the old api: https://pastebin.com/hppZJG26
[21:31:41] 	 produnis: the process is largely unchanged, the only thing that is deprecated is that you can no longer login with the account's main password
[21:31:54] 	 you first need to generate a bot password via Special:BotPasswords and then use that instead
[21:32:51] 	 so, if you take your old code and swap out the password, that should probably be enough
[21:33:59] 	 I generated BotPassword, login works well with that. My problem is, that my old code used "request.post" to handle the login, and I was able to save the session to a cookie. The exampleCode of the new Api uses "request.sessions" to handle login, and I am not skilled enough to transfer this new style, so that I get a r2.cookie. 
[21:34:41] 	 and I need this cookie, because my whole code uses "mycontent = requests.get(the_url, cookies=r2.cookies)" to read the pages
[21:38:47] 	 I'm looking at https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python
[21:39:03] 	 I can probably update it.
[21:41:04] 	 thx, Haley, that would be very nice!
[21:42:19] 	 produnis: That script works fine. I just tested it.
[21:42:23] 	 https://test.wikipedia.org/w/index.php?title=Sandbox&diff=prev&oldid=376239 is the example edit.
[21:50:09] 	 hmm, I get 
[21:50:09] 	 {'warnings': {'main': {'*': 'Subscribe to the mediawiki-api-announce mailing list at  for notice of API deprecations and breaking changes.'}, 'login': {'*': 'Fetching a token via "action=login" is deprecated. Use "action=query&meta=tokens&type=login" instead.'}}, 'login': {'result': 'NeedToken', 'token': 'f6a5a167d89e3ce72e5d94343ce635d75c4cd5b7+\\'}}
[21:50:47] 	 a session in python requests takes care of saving/sending cookies for you, so you don't need to explicitly handle that
[21:50:57] 	 has nothing to do with the mediawiki API
[21:51:14] 	 as for that warning, see what it tells you to use to fetch the login token
[21:51:34] 	 it is the script from https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python
[21:52:12] 	 produnis: You're sure?
[21:52:16] 	 I'm not going to spend time walking you through basic programming. API docs for the python requests library are readily available and very easy for humans to read
[21:52:37] 	 The script at https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python is already using action=query&meta=tokens&type=login.
[21:52:39] 	 and the warning message also tells you what you need to do re: login token
[21:52:54] 	 So I'm not sure you're talking about the same code.
[21:54:17] 	 ?! 
[21:54:28] 	 If I try the code, I get 
[21:54:28] 	 RuntimeError: {'warnings': {'main': {'*': 'Subscribe to the mediawiki-api-announce mailing list at  for notice of API deprecations and breaking changes.'}, 'login': {'*': 'Fetching a token via "action=login" is deprecated. Use "action=query&meta=tokens&type=login" instead.'}}, 'login': {'result': 'NeedToken', 'token': '63d1c6d2d26e4ca885843525b3a7120d5c4cd6fd+
[21:54:29] 	 \\'}}
[21:54:38] 	 this code here:
[21:54:38] 	 https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python
[22:06:43] 	 ?!
[22:06:46] 	 I dont get it...
[22:06:51] 	 it is not working....
[22:15:05] 	 the r2 call gives that error
[22:34:40] 	 r2 still uses "action: login", which is deprecated, as I understand
[22:39:18] 	 the r1 call gives {'batchcomplete': '', 'query': {'tokens': {'logintoken': 'c5340938a1221ce345259aecc9f09c8e5c4ce184+\\'}}}
[22:39:29] 	 but r2 gives RuntimeError: {'warnings': {'main': {'*': 'Subscribe to the mediawiki-api-announce mailing list at  for notice of API deprecations and breaking changes.'}, 'login': {'*': 'Fetching a token via "action=login" is deprecated. Use "action=query&meta=tokens&type=login" instead.'}}, 'login': {'result': 'NeedToken', 'token': 'f510caca6596e5944c9fbd2ea973
[22:39:29] 	 0fc05c4ce184+\\'}}
[22:39:43] 	 if I use this code here:
[22:39:43] 	 https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python
[22:39:50] 	 what am I doing wrong?
[22:39:50] 	 you need to specify the logintoken to action=login that you got from the first call
[22:40:47] 	 https://www.mediawiki.org/wiki/API:Login
[22:40:49] 	 yes, r2 does this    'lgtoken': r1.json()['query']['tokens']['logintoken'],
[22:41:46] 	 what's your code?
[22:42:01] 	 my code is this code:
[22:42:01] 	 https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python
[22:42:10] 	 no your actual code, go pastebin it
[22:42:53] 	 unless you recently copy/pasted from there
[22:43:58] 	 https://pastebin.com/WkgSTzqu
[22:44:10] 	 if you did, all I can say is start debugging; print out the values you receive from each call to see what you get
[22:44:26] 	 as you can see, I am doing so
[22:44:38] 	 you have a typo on line 25
[22:44:40] 	 it's query, not mquery
[22:45:04] 	 hm?
[22:45:09] 	 ah
[22:45:12] 	 mquery
[22:45:36] 	 fixing that should make it work :)
[22:45:43] 	 still getting RuntimeError: {'warnings': {'main': {'*': 'Subscribe to the mediawiki-api-announce mailing list at  for notice of API deprecations and breaking changes.'}, 'login': {'*': 'Fetching a token via "action=login" is deprecated. Use "action=query&meta=tokens&type=login" instead.'}}, 'login': {'result': 'NeedToken', 'token': 'cce81c451171cab06a00a3348c6
[22:45:43] 	 bc8ac5c4ce300+\\'}}
[22:45:58] 	 for r1, i get {'batchcomplete': '', 'query': {'tokens': {'logintoken': '7f5bc222a4fead774bf1f0fac24263035c4ce300+\\'}}}
[22:47:35] 	 the error sound to me, that I am missing parameters in r2
[22:47:46] 	 or it didn't like your token for some reason
[22:48:35] 	 hmm, no, that gives WrongToken, not NeedToken
[22:49:18] 	 how are you running the python code?
[22:49:26] 	 from commandline
[22:49:36] 	 the wiki is on a different machine
[22:49:45] 	 and just to be 100% sure, the code you're editing is the same file as the code you're running?
[22:49:51] 	 my script exports my whole wike to a nice pdf-book
[22:49:58] 	 yes
[22:50:04] 	 its the same file
[22:50:49] 	 if the user-bot-login would fail, I would get a different error, h?
[22:51:17] 	 yes
[22:53:40] 	 do I need to add something to my LocalSettings.php?
[22:54:53] 	 no, can you add a print(r2.request.body) somewhere?
[22:55:05] 	 verify that the lgtoken is present
[22:55:54] 	 request body:  format=json&action=login&lgname=produnis&lgpassword=pdfexport%40cccv583jineppc7lmdecfcnla9cdd0ki&lgtoken=5e42cef6366e2d42b6c800fcf27beab25c4ce56d%2B%5C
[22:56:25] 	 er, should've mentioned that contains the password in it...
[22:56:30] 	 (I salted the password)
[22:56:59] 	 so, I see the token is present
[22:57:06] 	 so it's not anything with the python code then
[22:57:15] 	 must be something server-side
[22:57:31] 	 I updated to 1.32 4 hours ago
[23:03:14] 	 Anyone knows if dirtymarking of a page due to tracked pages are supposed to work in MW-Vagrant? It seems like it don't work. 
[23:03:50] 	 produnis: can you print(session.cookies) at the end of r1 (before r2 is sent) and at the end of the script as well?
[23:15:08] 	 produnis: I looked up the code, there's 2 reasons why action=login returns NeedToken. 1) it can't find your session, 2) there was no token provided in the request
[23:15:34] 	 we've verified it's not 2 since you're sending it over, so it's the first. Now we just need to find out *why* it can't find your session
[23:16:22] 	 the two main reasons for that are 1) you aren't passing the session cookie (which my advice above hopes to determine), or 2) session storage on the wiki is broken (which you can verify by logging into your account via your browser and attempting an edit via the UI and seeing if it lost your session or if it worked)
[23:16:50] 	 session cookies:  ]>
[23:16:50] 	 request body:  format=json&action=login&lgname=produnis&lgpassword=pdfexport%40jv6sto7cjvp741f9fvgtloaom5klttph&lgtoken=0fd5aa536ecb841395626dfebef41b725c4cea56%2B%5C
[23:17:46] 	 oh bleh
[23:17:52] 	 do print(dict(session.cookies)) then
[23:18:01] 	 You can remove the request body printout; don't need that anymore
[23:18:28] 	 session cookies:  {'produniswiki_session': 'iigtugfmo9fk0ucbfdq7isvhvmcmk08l'}
[23:19:41] 	 for both?
[23:19:49] 	 (between r1/r2 and at the end)
[23:20:42] 	 session cookies before r1:  {}
[23:20:42] 	 {'batchcomplete': '', 'query': {'tokens': {'logintoken': '0e357e88dec2cf7fa590dcf25288ceed5c4ceb41+\\'}}}
[23:20:42] 	 session cookies after r1:  {'produniswiki_session': 'eh0komu2sntek70h0m0omj5l9lt9i980'}
[23:20:43] 	 session cookies after r2:  {'UseCDNCache': 'false', 'UseDC': 'master', 'produniswiki_session': '21o4r3ibaqja1f6172rg2uh21p4clt35'}
[23:20:57] 	 ok, so you have 2 different values for the session cookies
[23:21:13] 	 that means either the session cookie isn't being sent like it's supposed to, or mediawiki doesn't think that's a valid session and as such issues a new one
[23:21:29] 	 can you try logging into your wiki's UI using your regular account and try editing a page?
[23:21:59] 	 *editing and saving a page
[23:22:03] 	 (the saving bit is important)
[23:22:13] 	 works with firefox
[23:22:24] 	 ok, when you do it in firefox, are you using http or https?
[23:22:30] 	 ah, but I logged in "as normal", not as Bot
[23:22:35] 	 https
[23:22:40] 	 yeah, bot passwords won't work with regular login
[23:22:41] 	 in my script: http
[23:22:49] 	 ok, your API calls are using http, try switching to https and see if that works
[23:23:30] 	 (if it works, it means the session cookies are being sent with the Secure attribute, so you can only use sessions over https)
[23:23:46] 	 session cookies before r1:  {}
[23:23:47] 	 {'batchcomplete': '', 'query': {'tokens': {'logintoken': 'bf96dc4892ea8c811107cc054b79077e5c4cebf8+\\'}}}
[23:23:47] 	 session cookies after r1:  {'produniswiki_session': 'uh5irg3o7ivcp7iuasrcotd6nj1jeo4q'}
[23:23:47] 	 session cookies after r2:  {'UseCDNCache': 'false', 'UseDC': 'master', 'produniswiki_BPsession': 'c1pbgs8lrdi0fovc52jgsmq4bo9upva3', 'produniswiki_session': 'uh5irg3o7ivcp7iuasrcotd6nj1jeo4q'}
[23:24:11] 	 that looks good, did you get the warning message on the login?
[23:24:15] 	 no
[23:24:17] 	 (the NeedTokens thing)
[23:24:19] 	 then it worked :)
[23:24:25] 	 I think that was the "problem"
[23:24:30] 	 THX A LOT!!!
[23:24:32] 	 np
[23:26:01] 	 let me spend you a coffee!
[23:26:11] 	 do you have paypal or such?
[23:39:56] 	 I've upgraded a MediaWiki from 1.19 to 1.31 and have a couple of problems I'm trying to solve
[23:40:16] 	 Browser console error on page loads: "Uncaught ReferenceError: addOnloadHook is not defined"
[23:40:48] 	 I've tracked it down to a usage of addOnloadHook in MediaWiki:Common.js
[23:41:43] 	 Shouldn't that have been updated during the upgrade process?
[23:42:27] 	 Anything you place on Mediawiki:Common.js is custom by the users of the wiki, so the installer can't blindly update that
[23:42:57] 	 steevithak: who wrote that page?
[23:43:06] 	 surely it wasn't mediawiki itself
[23:43:37] 	 Bummer, I'm not sure who created the code that's in there and it may not be possible to find the original author
[23:43:58] 	 Is that field empty on a fresh install?
[23:44:04] 	 look at history tab :P
[23:44:22] 	 yes, it's empty on a fresh install
[23:44:29] 	 it's there so that you can add custom javascript
[23:44:34] 	 if so you wish
[23:45:20] 	 History shows user who hasn't logged in for around 10 years :)
[23:45:27] 	 heh
[23:46:03] 	 Ok, cool, though, I'm going to start commenting out the offending code and see what happens
[23:46:36] 	 at most, some effect added 10 years ago, would stop being there
[23:46:51] 	 most likely you didn't even notice you had it before ;)
[23:56:49] 	 Yay, turned out we didn't need any of that old code. That problem is solved, thanks!
[23:58:10] 	 Next problem is another use of addOnloadHook in Vector.js but I'm pretty sure this one is important. Is there any documentation on what replaces addOnLoadHook?