[00:14:17] hey guys, i have weird characters displaying when i used $wgOut->addWikiText("title"); [00:14:18] http://tinypic.com/view.php?pic=eslrhy&s=8#.VZMvSxuqpHw [00:14:23] how do i solve that? [00:14:56] four: update to the latest version of the RSS extension [00:15:10] i am not using RSS extension though [00:15:17] i mean the problem is not with RSS extension [00:15:26] i am using newest page extension.. [00:16:14] (https://dpaste.de/ro3r#L329) check out line 197 [00:16:18] i am trying to output the article content [00:16:42] if i used wgout->addHTML it gives me == (random) == instead of the (random) header in bold . [00:17:03] thanks for your response and assistance [00:28:52] So I am currently trying to use Wikimedia's MediaWiki Ruby API to edit a page. I've spent a while trying to figure out why, but for some reason the get_token method that is called by the edit method is undefined. Here's the full console log https://gist.github.com/elifoster/e6891791a8035f081253 and all the code is here https://github.com/elifoster/SatanicBot/tree/master/src/ruby [00:29:05] I am also asking this in #ruby. [00:59:45] This is me confirming that the previous question is actually just a bug that arose either in 0.3.1, 0.4.0, or 0.4.1 [01:00:40] hey guys [01:00:47] why is my parser method not being read? [01:01:39] https://dpaste.de/P7QN (from line 14-30 is my parser function) but it is not going in the method [01:01:50] didnt see any echo on my screen when i am trying to test.. [01:02:58] four: echo doesn't work [01:03:01] !debug [01:03:01] For information on debugging (including viewing errors), see http://www.mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://www.mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging [01:03:11] > One of the first things you will notice is that "echo" generally does not work; this is part of the general design. [01:06:51] So, as of 0.4.0 of the mediawiki_api Ruby Gem, editing does not work. [01:06:54] That's fun. [02:18:14] i would like to ask why did uniq (http://postimg.org/image/ar2q28dcl/) appear when i changed my code to this ? (https://dpaste.de/AQwR) [03:50:45] Is there any way I can get a diff in a JSON format showing exactly what was added and what was removed? [04:06:01] kind of [04:07:23] enterprisey: https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=API|Main%20Page&rvprop=timestamp|user|comment|content&rvdiffto=prev [04:07:36] https://en.wikipedia.org/w/api.php?modules=query+revisions [04:07:47] you'll have to parse the diff yourself [04:08:25] ok, cool [04:08:25] thanks [04:28:58] Does anyone know if you can define your own date format for {{time}} formatting? [04:30:19] I can get the date I want in a non-standard format, can I instruct {{#time}} on how to parse it? [06:35:32] bawolff: do you have any more suggestions for improvement for https://gerrit.wikimedia.org/r/#/c/193838 (actual watchers) or should it just be merged? :) [06:36:02] I haven't had a chance to look at it since you fixed it. Probably it should just be merged [06:39:24] * bawolff mutters about the documentation for the openssl command [06:42:29] I'll take a look at it after I finish trying to figure out wmf's ssl config [06:45:07] LOL most people would ned to budget a few days of time to achieve that ;) [06:47:55] Well I'm not sure if I'm going to sucede [06:48:18] All I want to know is why commons.wikimedia.org with sni isn't getting *.wikimedia.org cert instead of the wildcard [06:50:22] oh maybe none of them do. maybe they just disabled sni [06:56:25] c02fab71422a490dbdcf was what i was looking for [07:00:18] Sometimes it feels like figuring out what ops is up to is like looking for a needle in a haystack [07:00:31] but on the brightside, I just learned about the existence of https://performance.wikimedia.org/ [07:32:55] anyone knows why isnt my parser function working? [07:34:16] https://dpaste.de/P7QN (this is the code which i am using for my parser) [07:34:34] from line 14 to 30 but the method is not going in as i didnt see the echo words on the screen ? [07:34:38] please advise. thanks [07:35:04] four: The parse method of $parser cannot be used inside a parser function [07:35:30] four: echo won't work in parser functions due to output buffering (If you need to do quick debugging output, use var_dump() ) [07:35:59] If you need to parse stuff inside a parser function, use $parser->recursiveTagParse( "stuff to parse" ); [07:36:16] nono [07:36:22] i mean on line 17 [07:36:33] it should echo out "inside" on the screen, i am checking to see if it goes in that method [07:36:36] but apparently it is not ? [07:36:54] so if i use the tag () it is now showing me anything :/ [07:37:18] or am i not getting you? i am sorry [07:37:36] Echo won't work (almost) anywhere in mediawiki [07:37:47] ok............ [07:37:47] due to output buffering [07:38:15] so i should use var_dump() to check? [07:38:19] yes [07:38:41] so i should change from echo to var_dump on line 17? [07:38:46] yes [07:39:16] it is still showing me [07:39:22] nv do anything :/ [07:40:10] did you purge the page? [07:40:39] is your extension being included from LocalSettings.php ? [07:40:55] localhost/wiki/title=?action=purge? [07:41:05] yup, it is included in localsettings. [07:42:24] Well either ?action=purge at end of url, or &action=purge depending on if the url already has a ? in it [07:42:30] purged it, still showing me [07:43:02] i dun think it is executing my parser function :/ [07:44:06] Hmm, well the code looks like it should work... [07:44:39] because it is an existing extension , i am trying to edit [07:44:43] to make it retrieve the content [07:45:32] When I tested it on my computer, it worked [07:47:18] sorry, my irc hang. did you say anything after you said it work on ur comp? [07:47:25] no [07:47:35] ok.. [07:47:56] or do my parser function has to be inside the class? [07:48:07] at line 130~ [07:52:22] It doesn't matter if its in a class or not. MediaWiki supports both [07:52:35] hmm [07:52:40] is weird.. [08:01:59] any idea why is it giving me a uniq character when i tried this code [08:02:00] (https://dpaste.de/3fHn) [08:02:08] when i tried to output addWikiText [08:03:03] here (http://postimg.org/image/hqmh9t8k3/) [08:03:10] how to solve the uniq error? [08:03:34] four_: Its because you are calling $parser->parse() [08:03:40] don't do that in a parser function [08:03:51] call $parser->recursiveTagParse instead [08:05:03] where [08:05:06] i didnt call $parser [08:05:14] u mean my previous error? [08:05:22] on why it is not showing ? [08:07:01] four_: it's you again/ [08:07:07] ya!! [08:07:13] my error is not solved ;( [08:07:20] damn emo =( [08:07:21] Oh sorry, I was looking at your previous paste (Calling ->parse will also cause uniq's [08:07:59] four_: Is this still from a parser function? [08:08:13] wikiText is a parser function? [08:08:23] wikiText is giving me the uniq problem.. [08:08:32] four_: did you try getParserOutput() from the article instead? [08:08:45] $wgOut->addWikiText cannot be used from a parser function [08:08:49] bawolff: he is in the special page [08:09:08] i am confused [08:09:08] Its also can't be used when transcluding a special page, if he's doing that [08:09:19] don't think he knows what it means :) [08:09:32] :p [08:09:43] sorry for my lack of knowledge .............. [08:10:08] four_: ARe you displaying this page by writing {{Special:Soemthing}} on another page (That [08:10:15] 's what I mean by transcluding a special page) [08:10:56] oh, probably he is - he's hacking on https://www.mediawiki.org/wiki/Extension:Newest_Pages [08:11:13] yup i am [08:11:19] because i am trying to retrieve the content based on the title [08:11:29] I think the addWikiMsg bug actually got fixed on some version of mediawiki, or maybe we just talked about fixing it and never did. Can't remember [08:12:27] four_: Anyways, the whole UNIQ12323 thing happens if you call $parser->parse() when a page is in the middle of being rendered, or you call a method (like ->addWikiText() ) which later calls $parser->parse [08:12:29] dun think is fied :/ [08:12:52] so back to square one [08:12:57] so cannot be fixed ? since it is a bug? [08:13:07] this is how i retrieved my article (http://postimg.org/image/ledpqf8x1/) [08:13:13] four_: There is work arounds for the bug [08:13:33] docs say there is a bug https://www.mediawiki.org/wiki/Manual:Special_pages#OutputPage-.3EaddWikiText.28.29 [08:13:37] then to display on the main page , i used $wgOut->addHTML($this->showArticleText($row) but is not really working [08:14:35] https://www.mediawiki.org/wiki/Manual:Special_pages#workaround_.231 <-- [08:14:38] you need this [08:16:55] let me try i hope it works.. [08:20:36] omg.. it sorts of work [08:20:40] at least it is retirieving the header now instead of showing me == ... === [08:27:28] thanks for both of your help [08:27:34] i am really grateful . [08:27:38] glad to help [08:27:42] many many many many many thanks!!!! =) [08:32:30] four_: great it worked! [08:34:48] thanks thanks thanks thanks thanks!!!!!!!!!!!!! =) [08:43:59] four_: can you put a whole file somewhere, maybe we should include this code in the extension :) [08:46:24] sure, i would glad to, but where? haha [08:46:27] this ? https://gerrit.wikimedia.org/r/#/q/project:mediawiki/extensions/NewestPages,n,z ? code review? [08:48:47] four_: yeah! [08:49:25] alrighty, will do!! =D [08:50:04] if you have any problems with git/gerrit, let us know [09:38:16] how do i use the word $this? [09:38:24] i am trying to check if it is main page [09:38:36] if ($this->getSkin()->getTitle()) { // do something [09:38:48] but i am getting Using $this when not in object context [09:42:07] four_c: $this refers to the instance of the class you are currently in [09:42:16] *four_: --^ [09:42:35] So if you are in a special page, $this means your special page [09:42:49] but if you're in a random global function, than $this won't work [09:43:45] oh my [09:43:53] then how should i get the main page? [09:43:59] Sorry, that wasn't the most clear explanation probably [09:44:09] it is in a random function~ [09:44:14] lol :p [09:44:33] Depends where your function is. Do you have a $parser object? [09:45:11] if so, use $parser->getTitle(); [09:45:17] oh naise [09:45:19] let me try [09:45:34] if not $parser, what other objects are you currently using [09:46:36] i have this function wfExample(Parser $parser) , is it considered having a parser object? :/ [09:46:54] yeah [09:47:21] alrighty thanks :) [09:47:22] so you should be able to do $parser->getTitle()->isMainPage() [09:48:16] ahh i see, thanks once again =) [10:28:14] Nemo_bis: You never know when the 'pedians will riot [10:28:17] I live in fear [10:35:45] I got over that stage many years ago :) [10:42:37] Huh, Suddenly people want release notes again? [10:43:04] Its like a time warp to svn days :) [10:43:55] every new $wg variable deserves a RELEASE NOTES mention [10:44:14] Oh, yeah I guess that's true [10:51:52] I even added @since! [11:27:04] gr8 thnx [11:46:05] hi, I have some problems with the ReplaceText extension. I want to move all articles from a category to another namespace. that should be easy with this extension but I'm getting strange results [11:47:18] Search string: (.*), Replacement string: Latina:$1, that should be enough, shouldn't? [11:47:33] (namespace called Latina) [11:47:56] but it's being removed to strange names like Latina:Latina:aLatina:Latina:nLatina:Latina:aLatina:Latina:tLatina:Latina:hLatina:Latina:eLatina:Latina:mLatina:Latina:aLatina:Latina: Latina:Latina:sLatina:Latina:iLatina:Latina:tLatina: [11:48:11] (for article named anathema sit..) [11:49:18] *I mean it's being moved [11:52:48] I dont get it [11:53:10] thegamer93: do you know the ReplaceText extension? [11:53:17] no :( [11:53:24] I need help with AbuseFilters [11:53:25] action == "edit" [11:53:26] & ( [11:53:26] article_text contains "lol" | [11:53:26] ) [11:53:27] does nothing [11:54:12] I need some filter that prevents the use of two template "{{Community_Icon}}" and "{{Abenteuer_Icon}}" [11:54:31] no idea I'm not familiar with abusefilters [11:57:15] and what is your problem with replace text? [11:57:18] may I help you? [11:57:28] I am afk for 5 - 10 mins and then i look at your problem [12:11:02] auvajs left, apparently [12:15:24] :/ [12:15:45] @Vulpix you were the one who said that I can use AbuseFilters to block the Template Usage right? [12:15:54] I did the filter above but it does not work [12:16:34] !"autoconfirmed" in user_groups [12:16:34] & action == "edit" [12:16:35] & ( [12:16:35] article_text contains "lol" | [12:16:35] ) [12:19:49] what have you tested so far? have you tried to make an edit as anon and adding "lol" in the page? [12:20:40] anons can not edit the page but a testuser can [12:20:51] and the testuser can edit the "badwort" aka "Template" in [12:21:12] the "lol" is just for testing [12:21:14] umm, wait, article_text is the title of the page, not the contents. gj AF... [12:21:22] oh [12:22:29] new_text [12:23:10] maybe you mean new_wikitext? [12:23:22] https://www.mediawiki.org/wiki/Extension:AbuseFilter/Rules_format [12:23:52] new_text works [12:29:00] added_lines is cheaper, I hink [12:29:26] think* [12:29:49] it depends if those variables are calculated on every edit or only when used on the filter [12:33:50] the use case is: we have a pen and paper adventure which gets streamed on twitch and we want the community to fill the world and then we have community people who approve this and we have the streamer who changes the icon again so users see their creations got picked [12:34:22] so like a two step approval which has to be visible for the user [12:34:56] I tried FlaggedRevs which is way to complex but ApprovedRevs and AbuseFilter as solution seems to work [13:14:00] What is the easy way to backup a entire mediawiki? [13:15:18] !backup [13:15:18] 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. [13:15:36] @seen happy5214 [13:15:36] Niharika: Last time I saw happy5214 they were leaving the channel #pywikibot at 6/29/2015 9:15:02 AM (2d4h34s ago) [13:15:51] thanks Glaisher [13:16:23] Glaisher: I know this manual, However, could be nice have a script [13:17:11] The_Photographer: There are several scripts listed on that page. [13:17:17] https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Scripts [13:17:59] Glaisher: thanks again [15:13:27] guys [15:13:42] how do i check if the current page is in the main page? [15:13:57] from where? [15:14:00] if ($this->getSkin()->getTitle()->isMainPage()) { // dont show icon [15:14:14] i tried the above, but it is giving me cannot use $this error ~ [15:14:31] u hold on a min, i show u my code where i put it [15:22:15] https://dpaste.de/ENfm [15:22:26] u can look at line 470 [15:22:36] basically , it will display a "like" icon on every page [15:22:49] but now, i want it to not display on the main page but every other pages [15:23:09] so i am trying to check if it is main page , dun display the icon [15:24:40] four: apparently nothing calls wfSetupLikes() [15:24:52] it is [15:24:55] wait.. [15:25:11] it is on line 32 [15:25:37] or is that not one ? :/ [15:25:44] ah, $wgExtensionFunctions, but that's not right... you should use a hook [15:26:20] hooks provide context objects like the current page, user, skin, etc you can use to query things like if the page is main page or not [15:26:24] !hooks [15:26:24] Hooks allow you to run functions at various points in the main MediaWiki code. For more information about using hooks in MediaWiki, see . [15:27:02] so i should add on? [15:27:06] or change the whole function?!?! [15:27:16] i have a parser function too.. dunno if that helps [15:27:27] on line 204 [15:28:18] well, you already call OutputPageBeforeHTML [15:28:57] but you're assigning it $this? that looks wrong [15:29:14] !hook OutputPageBeforeHTML [15:29:14] https://www.mediawiki.org/wiki/Manual:Hooks/OutputPageBeforeHTML [15:29:36] it expects to be a function, not a class instance [15:30:10] i just googled how to check for main page online :P [15:30:19] thought i could use $this though.. [15:42:35] when looking at an Image I see where it is embedded [15:42:41] is this possible to do for templates? [15:45:15] may i ask how come only when i press ctrl f5 then i can see my counter increase, when i press f5 , it just stays at 0 [16:04:41] thegamer93: go to Special:WhatLinksHere [16:50:01] I run a wiki on www.ngw.nl. Since this morning suddenly the content part of the wiki does not show. See : http://www.ngw.nl/heraldrywiki-old/index.php?title=Amsterdam. I have now enabled php-errors and these are shown on the page. I did not do anything on the page since yesterday morning and yesterday evening it worked fine. How didi this happen ? [16:52:05] Knorrepoes: Your host probably upgraded PCRE. [16:52:22] You'll have to either upgrade your wiki or ask your host to downgrade PCRE. [16:52:30] https://phabricator.wikimedia.org/T60640 [16:52:34] Glaisher, no they did not. Last time in September 2014 (I asked that) [16:53:00] They didn't change anything? [16:53:42] Upgrading to 1.25 is not working either. The upgrade page does load, but it gets a blank screen and now I get Error 500 messages everywhere [16:54:01] They claimed they did not change anything (www.one.com) [16:57:22] Knorrepoes: Can you try to upgrade your wiki through command line then? [16:58:35] I do not know how. It seems I have no shell access ? [17:00:10] Knorrepoes: You'll probably have to ask your host then. [17:01:06] I can run : http://www.ngw.nl/heraldrywiki/mw-config/, update the key and press continue. But then I get a blank page after about 30 seconds... Is that a timne out ? [17:03:33] I'm not sure. [17:05:13] looks like a timeout [17:06:50] After 30 sec ? But would the wiki work without the update script ? As I see nothing at all, only Error 500. [17:21:48] !blank [17:21:48] A blank page or HTTP 500 error usually indicates a fatal PHP error. For information on debugging (including viewing errors), see . [17:23:02] Knorrepoes: if you don't run the update script, the database schema won't be updated and you can get errors about missing tables or fields [19:18:30] The format of mw.loader.register has changed [19:19:44] https://de.wikipedia.org/wiki/Wikipedia:Technik/Skin/JS/ResourceLoader#mw.loader doesn't appear up-to-date anymore [19:20:56] https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.loader is also outdated [19:21:03] "One string or array of strings of module names on which this module depends, or a function that returns that array." [19:21:12] @dependencies [19:21:34] but it's an array of numbers now [19:22:01] numbers of indexes of modules defined in the register-array? [19:27:38] rillke: hmm, for which method? [19:28:58] mw.loader.register [19:29:15] I was used with ["ext.gadget.LanguageSelect", "1364400202", ["jquery.cookie", "mediawiki.user", "mediawiki.util", "site", "user"], null, "commonswiki"], [19:29:33] but now it's something like ["jquery.autoEllipsis", "nRurpkYx", [37]], [19:30:41] according to the tests, it looks like I can still use module names as keys [19:30:46] rillke: ugh, are you calling .register() in your code? sounds scary. yeah, the numeric values are indices [19:31:07] the old format is likely still supported, though? [19:31:34] (they were changed to indices instead of full names to make the payload smaller) [19:31:43] MatmaRex: https://meta.wikimedia.org/wiki/User:Rillke/logo_2013_voy.js [19:31:53] somtimes I need to use gadgets elsewhere [19:32:18] or here: https://commons.wikimedia.org/wiki/User:Rillke/SVGEdit-WYSIWYG.js [19:32:52] rillke: looking at the code, the old format should still be supported perfectly well. [19:33:16] and I used to extract this code from what mediawiki has put out [19:33:44] rillke: if you want to know how it works, search for 'resolveIndexedDependencies' in /resources/src/mediawiki/mediawiki.js [19:35:10] interesting, thanks [19:52:25] Is it possible to implement something like this from the English Wiki https://en.wikipedia.org/wiki/Wikipedia:RefToolbar to a local one? [19:58:51] hey hello [19:59:07] is it normal to have 760027 jobs in the queue and counting up? [20:04:02] probably not [20:04:18] i'll let aaron know [20:08:09] is it a problem for runJobs.php to overlap? [20:08:30] i mean, is it prepared for parallell execution? [20:08:34] yes [20:17:55] Axelei: is this for your own instance? [20:18:08] instance/install/whatever word you want to use :) [20:18:11] my own mediawiki installation? yes [20:18:16] * greg-g nods [20:18:39] these are the stats: http://www.frikipedia.es/api.php?action=query&meta=siteinfo&siprop=statistics&format=jsonfm [20:24:47] i see many duplicate entries in the job table [20:24:59] like "enqueue" "Portada" [20:25:08] is it safe to delete duplicates? [20:25:44] some even have duplicate SHA-1 [20:32:58] Hi, is there something like isContentPage() but for files? [21:25:35] Hello, I don't really understand how to use if statements. I've tried using them in a template but it's just returning the entire statement as string. [21:25:51] http://wiki.clashwars.com/wiki/Template:Avatar That's the template [21:26:06] And here you can see they don't work http://wiki.clashwars.com/wiki/Main_Page [21:26:26] Returns this URL for me: http://cravatar.eu/{{#if:{{{type}}}%7C{{{type}}}%7Chelmavatar}}/Worstboy/{{#if:{{{size}}}%7C{{{size}}}%7C16}}/Worstboy.png [21:26:50] how to see that? [21:27:48] if type is empty, {{{type}}} will literally return the text "{{{type}}}". you probably want {{{type|}}}, which if empty will return "" [21:28:22] it's a bit unintuitive really [21:28:35] Rojoss: you need https://www.mediawiki.org/wiki/Extension:ParserFunctions to be installed as well in the first place [21:34:20] Alright got it installed and working only thing is that it's not updating the params. [21:34:30] Can you not have params inside if statements? [21:35:33] I just want it to be if you don't specify it that it will use a default value and if you do that it used the specified value. [21:35:57] Rojoss: as MC8 said, you need the variable after #if to have a pipe [21:36:02] {{{type|}}} [21:36:06] otherwise it's always true [21:36:33] Aha sorry completely missed that message. Thanks. [21:38:04] Awesome it's working now :) [21:45:47] [5~[6~[6~[6~[6~[6~[6~[6~[6~[6~[6~[6~/scroll end [21:49:17] sorry [23:29:07] how is possible that a page is protected and there is no record in protect log? [23:30:43] Someone protected it directly in the DB? [23:31:18] Page got moved, perhaps? [23:31:52] weird - it says unknown user protected it https://sk.wikipedia.org/w/index.php?title=%C5%A0peci%C3%A1lne%3AZamknut%C3%A9Str%C3%A1nky&namespace=&type=edit&level=sysop&sizetype=min&size= [23:32:13] although in the history of the page there is no line of protecting log [23:32:23] nor in the protect log is any line of that page [23:32:37] particularly now talking about "Hlavná stránka" [23:33:12] it rather seems to me as broken db [23:33:14] Maybe this is from before the protection log existed? [23:35:34] hardly, check the very last one [23:35:45] (with unknown user) [23:36:44] https://sk.wikipedia.org/w/index.php?title=%C5%A0abl%C3%B3na:Infobox_album&action=history https://sk.wikipedia.org/w/index.php?title=%C5%A0peci%C3%A1lne%3AZ%C3%A1znamy&type=protect&user=&page=%C5%A0abl%C3%B3na%3AInfobox+album&year=&month=-1&tagfilter= [23:37:18] that has log items but says unknown user on special:protectedpages [23:37:25] it is very inconsistent [23:39:27] when was pr_user added [23:39:38] 2007, guess its not that [23:39:54] if they are sorted by the time of protection, then it has been protected in 2008 [23:40:25] wait, pr_user isn't even used now [23:40:27] template:shorttoc again has the log item in history and it is above the Hlavná stránka [23:41:03] Maybe before log_search entries were added [23:41:38] log_search isn't exposed to tool labs [23:41:55] hmm, obviously nbot sorted by protecting time, since wikipedia:krcma has been protected in dec 2006 [23:42:21] Danny_B: Support added in Thu Feb 13 20:48:53 2014 [23:42:32] for what? [23:43:09] For showing user on special:protectedpages [23:43:35] ok, but that still doesn't solve why there is no log entry for hlavná stránka [23:43:41] Anything before that probably will show unknown user, unless someone ran a db migration script [23:44:12] yeah, don't know about that. Db is screwy sometimes ;) [23:44:40] when was protect log added? [23:45:08] like 2004 [23:45:30] https://github.com/wikimedia/mediawiki/commit/41e752879cd906767c8473bb124345e8beb190e6 [23:46:07] ok [23:46:15] makes sense now [23:46:40] i justfound out that hlavná stránka was protected month before the log has been added