[02:19:20] anyone how to get out of the Could not open lock file for "mwstore: [02:19:40] ive looked at permissions up/down even a chmod 777 to see [02:22:59] ive even tried this chcon -R -t httpd_sys_script_rw_t /var/www/wiki/images/ [02:28:58] Oh dam that did work [02:28:59] lol [02:41:02] Hello/ [04:36:19] I'm writing unit tests, and I wonder if I should be writing unit tests for the editing-related functions. If so, how would such a unit test work? [04:57:59] chcon? [04:58:09] > chcon - change file security context [04:58:10] Huh. [05:56:27] Yvette: do you know anything about mediawiki unit tests [05:57:51] harej: you probably want browser tests? [05:58:59] legoktm[NE]: I'm sure I do, but is there any way to unit test, or do I just not do that? [05:59:17] you can, see what MassMessage does for example ot test edits [05:59:33] oh also, how do I pass a parseroutput by reference? [05:59:42] why [05:59:43] * harej clings to legoktm[NE] [05:59:46] okay so [06:00:09] I have a test that I want to write for the getParsedContent function [06:00:12] Here is the signature: protected function getParsedContent( Title $title, ParserOptions $options, ParserOutput &$output ) { [06:00:29] so I just generate a ParserOutput and try passing it as a parameter for the test, and get a complaint that I passed a value instead of a reference. [06:00:49] can you pastebin your test code? [06:01:55] https://www.irccloud.com/pastebin/lMd6KKux/ [06:02:54] what's the full error you're getting? I don't see anything obviously wrong with your code [06:02:55] testGetParsedContent is what you want [06:03:28] https://www.irccloud.com/pastebin/L9FjvYr7/ [06:22:22] harej: well, I'm not sure why you're getting the error, but can't you remove the & from $output? [06:22:58] Does my version of PHP have anything to do with it? [06:23:39] and from my reading of the code the passing of $output as a reference is not arbitrary [06:24:47] for reference: https://github.com/wikimedia/mediawiki-extensions-CollaborationKit/blob/master/includes/content/CollaborationHubContent.php [06:27:45] harej: unlikely but I'm not yet familiar with 7.1 changes [06:28:23] getParsedContent changes things to the ParserOutput in the course of its work; it's not just passed into getParsedContent for that function's own benefit [06:29:33] you only need to pass it by reference if you plan on replacing the entire object. if you're just modifying the same object, you don't need to pass it by reference [06:31:09] * harej removes the ampersand; checks for explosions [06:31:34] Somehow everything didn't break???? [06:31:37] Amazing [06:32:09] do you have any problems with my $output = $wgParser->getOutput(); [06:32:34] You can just do $output = new ParserOutput; I think [06:33:15] Also, is it cheating if I use the output of the test to write the test? :S [06:33:50] That would be the equivalent if I were a professor and I decided the right answer was whatever the smartest student in the class wrote. [06:35:32] nope! [06:35:36] just make sure the output looks good [06:35:54] I mean I know the output *right now* is good. [06:41:43] legoktm[NE]: also, I'm not sure if you can tell from reading that test class, but it looks like there are three test values, yet somehow only one is actually used in the test. [06:42:30] harej: you need arrays of arrays, not array of strings [06:43:27] the provideContentObjs method provides an array of arrays; the individual tests have an array of strings/objects for the results [06:45:32] Raymond_: I do appreciate how motivated TWN volunteers are! [06:46:18] harej: thank you :) [06:57:34] harej: oh, you're right. what did oyu mean by only one test value gets used then? [06:58:34] so, in theory we have two other test values, including for an empty content object (i.e. it includes the required parameters but no values for them, but such that it's still legal.) for the test results, the expected outcome is there would at least be some HTML, but I expect the outcome to be absolutely nothing and yet it passes. [07:16:58] legoktm[NE]: also, how do I generate a revision for unit testing? [07:38:07] harej: WikiPage::doEditContent() I suppose [07:38:18] weird [07:40:15] you can use Revision::insert() or something but that might leave you in a weird state if things change [07:41:40] it says doEditContent needs to implement the Content interface [07:41:48] my goal is to get a revision ID to feed into the function for testing [07:41:59] and... this: ( new WikiPage( $title ) )->doEditContent()->getId() [07:42:14] is a catastrophe that doesn't work [07:45:23] ($title is a main page Title object) [15:37:18] Okay, I give up. {{#invoke:Citation/CS1|citation |CitationClass=journal }} is appearing at the bottom of my reflist calls and I have absolutely no idea how to suppress the message or what I need to import to make it shut up. Can anyone provide guidance? [15:54:18] Scribunto, Lua and that Module? [16:00:26] someone can help me please? [16:01:28] someone can help me? [16:01:39] !ask saraambc [16:01:39] Please feel free to ask your question: if anybody who knows the answer is around, they will surely reply. Don't ask for help or for attention before actually asking your question, that's just a waste of time – both yours and everybody else's. :) [16:03:37] I need to edit the subtitles of the images on my page how do you do it? [16:04:12] I also need to replace one image with another image, how should I do it? Is it just delete and put another one? [16:05:52] Reedy: Well, I'm trying. But every time I try and import I'm being told there was a loss of session data. :| [16:07:02] big file? [16:07:58] 32 meg [16:08:41] Potentially [16:08:44] Got shell access? [16:14:20] Reedy: Yup. apparently my launch script only changed the upload_max value, post_max was still 2MB :( [16:15:39] * Reedy hugs Ulfr [16:15:41] I don't need your pity hugs! [16:15:54] I refrained from trolling earlier :( [16:16:56] Bah, you've never been one to go for the low hanging fruit. [16:18:40] Not seen all the bug fixes I do? ;P [16:19:30] Something like that, I'm sure. In my defense I just spent the last hour thinking someone magically ssh'd into one of my production servers from China. [16:20:30] Did they not? [16:23:12] Nope! It was someone I work with who decided to go globetrotting and everyone forgot they were in China [16:52:08] i'm currently trying to program an infobox to have a title that defaults to {{PAGENAME}}, but can be changed per page if needed [16:52:13] what would be the best way to format that? i tried {{#if: {{{Title}}} | {{{Title}}} | {{PAGENAME}} }} , but that makes it to where I still have to add "|Title = " to every instance of the infobox [17:08:41] factodef: https://www.mediawiki.org/wiki/Help:Parser_functions_in_templates [17:09:46] thank you! [17:51:36] hi, how can I substitute a template which uses lua? using subst:{{template}} substs {{#invoke:blabla}} but I want to subst the output of the template itself [17:51:54] I mean {{subst:Templatename}} [17:52:15] the template looks like {{#invoke:Func|fun}} [18:11:38] auvajs: I don't think it's possible to substitute the output of a module, though that could be useful. [23:38:02] Anyone know of a method to have a sort of easily editable image-map? It doesn't appear there are good SVG extensions for Mediawiki that can trustably make sure users uploading SVG's would be safe. However, it would be the easiest method for this to draw out diagrams and elements that you can click on. [23:40:34] CZauX_: Maybe you're looking for an icon font? Like FontAwesome. [23:41:31] MTres19: I mean being able to draw objects, like you would in Adobe Illustrator, and have images and such, but make it easy to edit and able to specify links [23:42:22] Maybe an extension that converts SVG's to images, but reads links and css and builds it ontop of the rendered image [23:44:28] CZauX: I still don't understand what you want. You want users to be able to edit pictures from their browsers? [23:44:55] Or do you want images to link to something else? [23:48:19] What I'm looking for is something like ImageMap, where you can put links over an image. But imagemap doesn't have highlighting or anything to really identify that a link on the image is a link [23:48:26] Installing a MediaWiki instance on a scratch webhost and restoring a database backup throws “[WJpbR0NKAkGjd0MCYkG@3wAAAC4] /w/ MWException from line 95 of …/htdocs/w/includes/cache/localisation/LCStoreCDB.php: Unable to create the localisation store directory "…/tmp_mbagst"”, no matter whether the directory exists or not, and no matter its permissions. Please advise. [23:48:30] (parts of paths omitted) [23:49:48] …nevermind, apparently I forgot to install, lol [23:49:56] s/install/run the installation script/ [23:50:12] or at least it's still there…… [23:50:27] * Halian_Ashrain is on 1.28.0 [23:51:05] …nope, that didn't change anything :( [23:51:50] CZauX: Oh, I think I see what you mean. Sorry but I think SVGs are your best chance. [23:52:37] Yeah, thats what I was thinking. However from looking at the good sanitizers, they still can't cover all cases of sanitization. [23:52:55] and are in node.js, so wee