[00:00:24] hm, the patch still removes the executable bit for those two files [00:01:12] tgr: I don't understand what I need to change in unit test. [00:02:33] yeah, our unit test infrastructure is not exactly user-friendly [00:02:53] you can look at https://integration.wikimedia.org/ci/job/mwext-qunit/9273/consoleFull [00:03:25] and find the Expected:... Actual:... bit [00:04:04] but of course the stack trace is completely useless due to minification [00:04:21] so you'll have to run the tests yourself in debug mode to get a usable stack trace [00:04:40] that tells you which line of the test needs fixing [00:05:42] MtDu: re: file permission changes, it's probably easiest if you just fix them by hand [00:05:56] chmod a+x [00:06:01] then add/amend/push [00:12:08] tgr: Can you walk me through the debugging and finding which line I need to change? [00:13:43] https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing#Run_the_tests explains how to run the tests [00:14:18] there is a module filter dropdown, you might want to set that to the mmv module, otherwise they'll run for a while [00:14:36] Ensure $wgEnableJavaScriptTest is set to true.. [00:14:40] and there is a debug mode checkbox which you'll need to enable [00:14:41] What file is that in? [00:14:59] if you are using vagrant, that's going to be set correctly [00:15:32] $wg stuff is usually in LocalSettings.php, although vagrant has a more complicated setup [00:15:45] but also comes with most things configured the way you need them [00:15:53] I'm getting a 503 service error [00:15:59] When I try to go the the home page on 127 [00:21:30] Do you mind running them on your browser? I'm not sure why my vagrant is not working. [00:22:39] tgr: Do you mind running them on your browser? I'm not sure why my vagrant is not working. [00:24:17] you will need vagrant to test that your patch is working, anyway [00:24:23] what's wrong with it? [00:24:30] I get a 503 service error [00:24:33] It was working earlier. [00:24:42] When I tested the other stuff. [00:24:51] I don't know why it's giving me that. [00:25:49] is it running? [00:26:00] you can check with vagrant status [00:26:05] Yeah. [00:26:25] hm [00:26:38] 503 is not an error code I would expect from vagrant [00:27:06] well, first step of problem solving, plug it off and back in :) [00:27:16] which in this case is done by vagrant reload [00:27:43] Am I doing ok with this task? I feel like I'm taking forever. [00:29:34] is it your first mediawiki patch? figuring out vagrant, gerrit and so on is not easy the first time [00:29:56] No [00:30:11] But this is on a new machine [00:30:48] it seems like some of your problems are from not doing local tests [00:31:24] in general, doing tests locally is more efficient because the test runner on gerrit is 1) slow 2) gives barely useful output [00:31:50] I got the 502 error [00:31:53] again [00:31:56] 503* [00:31:57] you waste much less time if you try to spot the error in a local qunit run than in the gerrit/jenkins log [00:33:22] try "vagrant ssh" to get into the vagrant box, then "curl https://localhost/wiki/Main_Page" [00:33:28] is that still an error? [00:35:03] how do you connect to vagrant, anyway? open 127.0.0.1:8080 in your browser? [00:35:14] Yeah. [00:35:51] It says theres like 20 updates, and to run git pull --rebase. [00:36:06] In my vagrant dir if I want them. [00:36:21] In my vagrant dir if I want them. [00:36:33] Do I need to update those? [00:36:36] there is no need to keep vagrant up to date [00:36:53] curl: (7) Failed to connect to localhost port 443: Connection refused [00:36:53] if it's half year old, that's maybe a problem [00:37:10] if it's a week or too old, that doesn't matter [00:37:26] sorry, the curl target should have been http:, not https:, my bad [00:38:22] https://dpaste.de/4KX5#L [00:38:25] Still get the error. [00:39:02] weird [00:39:39] the apache logs are either at /vagrant/logs or at /var/log (on your guest machine), can you check them? [00:39:54] What do you want me to check? [00:41:19] tail -n 30 /vagrant/logs/apache2.log [00:47:07] https://dpaste.de/AOL3 [00:48:31] tgr: https://dpaste.de/AOL3 [00:49:48] ok, can you do the same for the hhvm log? [00:49:50] Are those the ones you wanted? [00:50:35] on second thought the mediawiki error log [00:50:58] that was the one, yes, but all it tells is that the web server cannot connect to the php process [00:51:30] tail -n30 /vagrant/logs/mediawiki-exception.log [00:51:43] vagrant@mediawiki-vagrant:~$ tail -n30 /vagrant/logs/hhvm/error.log [00:51:50] can you try those? [00:54:00] How do I get out of vagrant@mediawiki-vagrant:~$ [00:54:36] ctrl-d (but you don't need to, for those two) [00:55:36] https://dpaste.de/Ni8p [00:56:23] and https://dpaste.de/1CwB [01:03:30] ah, looks like you'll need to update [01:04:05] you probably did a git pull on mediawiki core, but did not run the upgrade script which is needed when git pull brings in a DB change [01:04:23] the easiest way is using the "vagrant git-update" command [01:04:26] MtDu: ^ [01:04:47] Do this in vagrant? [01:05:11] Like while cded in vagrant [01:05:14] tgr:^ [01:05:21] no [01:05:41] all commands that start with "vagrant" must be done on your host machine [01:05:46] where vagrant is installed [01:05:51] so in vagrant ssh? [01:06:04] no, host machine is your normal computer [01:06:28] you use vagrant ssh to get into the guest (virtual) machine [01:26:43] okay [01:30:55] Btw, it's not updating the stuff that I have changes in [01:34:47] yes, there is no way for git to figure out how to safely do that [01:35:03] but that's fine as long as core is updated [02:09:35] tgr: Ok. I updated everything. I got this at the end. https://dpaste.de/AHNW [02:09:40] tgr: What do I do now? [02:11:59] tgr: I still get the 503 error. [02:12:14] MtDu: you need to update core [02:12:22] tgr: What command? [02:12:26] that did not happen this time because it was on a branch [02:12:37] you can return to master with git checkout master [02:12:48] (in the mediawiki directory) [02:13:00] after that, run vagrant git-update again [02:13:28] you can reset the other extensions to master as well if you don't need them anymore but it doesn't really matter [02:13:33] wait you want me to cd vagrant cd mediawiki and then git checkout master and then git update? [02:14:07] tgr:^ [02:18:51] MtDu: yes, except the last one is vagrant git-update [02:19:23] vagrant git-update does a number of things - a git pull on all your repos, a DB schema update on all your extensions, it pulls new libraries via Composer [02:46:34] tgr: I still get a 503 service error. :( [02:47:35] tgr: https://dpaste.de/vdRr [02:48:45] well, looks like there is something wrong with the file it mentions [02:49:17] maybe you edited it and there was a merge conflict or something and the file became invalid? [02:52:40] tgr: I don't see what's wrong with my file. [02:53:35] well, you can paste it into some JSON validator and it will tell you [04:20:10] (03PS14) 10MtDu: Add gender support to Multimediaviewer-text-embed-credit-text-tbls and other messages [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) [04:31:29] tgr: Is my new patch okay? [04:33:05] tgr: I took the GENDER stuff out of the en.json file. Wait. I'm supposed to leave that in right? [04:33:36] tgr: I am now on my mac, and am able to access http://127.0.0.1:8080/wiki/Special:JavaScriptTest/qunit/plain#. I have put the GENDER back into the en.json file. What do I do now? [04:36:19] tgr: I ran the tests. [04:37:55] tgr: I see the errors. They are here. https://dpaste.de/3vd8 [04:40:10] tgr: I just changed it what GENDER stuff it should have had based on the message. Is that right? [04:44:23] MtDu__: yeah, you should leave GENDER in en.json [04:44:39] tgr: I ran the tests in my mac witht he updated tests. They worked!!!!!!! [04:44:52] tgr: But I think I'm having some issues pushing a git review [04:46:20] MtDu__: are you using git review? [04:46:26] yes. [04:46:34] tgr: https://dpaste.de/S0cF [04:46:40] do you see a huge list of unfamiliar changes [04:46:41] , [04:46:43] ? [04:46:47] tgr: Lemme go ahead and copy the files to my windows machine and push the patch there. [04:47:30] seems like a mistyped user name or password [04:47:46] you can set up an ssh key for gerrit, that makes life easier [04:47:52] tgr: It's not that. I think it is something with my git config file. [04:48:17] well, it's an authentication error from gerrit [04:48:48] Not sure. I don't see one in MMV. That's why I switched to my Windows machine to push updates for this task. I couldn't get it working on my mac. It's really inconvenient, because my mac I can run 127 and test stuff, but can't push updates, but it's vice versa on my Window smachine. [04:49:08] tgr: Well, it's not that. Because git review should only ask you for your ssh password right? [04:49:22] depends [04:49:45] gerrit can use HTTP authentication or SSH authentication [04:50:00] in the first case it will ask for the same password as the gerrit web interface [04:50:28] in the second case your ssh client will ask for the passphrase of your private key (if it has one) [04:50:46] it depends on how your remote is configured [04:51:22] git remote show gerrit -> whether it starts with https:// or ssh:// [04:51:45] (03PS15) 10MtDu: Add gender support to Multimediaviewer-text-embed-credit-text-tbls and other messages [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) [04:52:18] tgr: Ok. [04:52:49] tgr: https://dpaste.de/jX3T [04:53:34] tgr: It's ssh. So that means something else is wrong. Do you know what? [04:53:39] so if you prefer SSH authentication, you need to change that [04:53:51] ah, sorry, wasn't looking properly [04:54:07] tgr: So what is wrong with my ssh? [04:54:14] tgr: Also, take a look. https://gerrit.wikimedia.org/r/#/c/260221/ :) [04:54:27] the other option is that git-review is configured to use some other remote (origin, probably) [04:55:47] try specifying it manually with git review -r gerrit ... [04:55:54] and see if that has an effect [04:56:29] tgr: that won't push a patch will it? [04:56:54] depends on the ... part [04:57:22] you can use the --dry-run option to make sure it does not [04:57:37] tgr: If I don't want it to push a patch, what do I type? [04:58:05] git review --dry-run -r gerrit [04:58:05] tgr: Also, can I submit my task on GCI now? [04:59:10] hm [04:59:19] that unit test seems wrong [04:59:33] it should have just worked as is [04:59:40] not sure what is going on there [05:00:06] tgr: It's just that now that I have added GENDER to the en.json file, it's different from what it used to be. [05:00:45] it's not really, the test parses the message to its English languge version, and GENDER should disappear in the process [05:01:14] maybe you are not passing the fourth parameter, and that's why GENDER:$4 is left as is [05:02:48] you should try to set lastUploader in the test [05:02:48] Aren't I pushing the parameter in line 32? [05:03:13] so the unit tests are testing a single function [05:03:25] in this case getCreditHtml [05:03:30] tgr: So add in lastUploader and make it the same as 'Author'? [05:03:37] everything else is pretty much faked up [05:04:04] you can see that the getCreditHtml in the test is passed a hand-made imageinfo object [05:04:14] and that object does not have lastUploader set [05:04:58] the nice thing to do is probably to fix that in getCreditHtml - if lastUploader is not available, just use 'unknown' instead [05:05:10] tgr: Ok. I changed the test to this. https://dpaste.de/91nY And it failed. It's not getting rid of the GENDER [05:05:11] or 'unspecified' or whatever we use for gender [05:06:04] what if you set lastUploader to 'male'? [05:06:34] tgr: It fails. [05:06:53] tgr: https://dpaste.de/ginx [05:07:23] weird [05:07:30] give me a sec to test that locally [05:07:36] tgr: Ok [05:09:56] tgr: perhaps is something wrong with the if statement in mmv.EmbedFileFormatter? [05:10:34] uh, yeah [05:10:41] indeed [05:10:54] I even wanted to mention that at some point then totally forgot [05:11:11] there should be an else branch there where you push 'unknown' [05:12:45] tgr: Ok. https://dpaste.de/psax Is that right? With the spaces and indents? [05:13:30] usually we write it like [05:13:39] } else { [05:13:55] otherwise looks right [05:13:57] tgr: Ok. [05:14:13] tgr: It still fails though. Both with lastUploader set as 'male' and set as 'Author'. [05:22:25] tgr: Here is the mmv.EmbedFileFormatter.js file https://dpaste.de/EV9H and the mmv.EmbedFileFormatter.test.js file. https://dpaste.de/1rMw [05:36:29] tgr: I'm not sure why it still isn't getting rid of the GENDER. [05:37:22] mw.message has lots of black magic in it [05:37:43] works differently depending on what JS classes are loaded, probably related to that [05:38:05] I'll walk through it with a debugger, I'll just need time to set up my environment [05:38:27] tgr: No problem. [05:39:28] tgr: Thanks for helping me. I've learned a lot about running tests locally. :) [05:47:43] (03PS1) 10Ananay: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 [05:48:50] https://gerrit.wikimedia.org/r/#/c/260221/15/resources/mmv/mmv.EmbedFileFormatter.js You're using spaces for indents, which is why it's all screwed up [05:52:50] Hydronium: Fixed. [06:08:06] tgr: Any updates? [06:15:47] tgr: Is there anything you want me to do? [06:22:21] tgr: Can you post anything you find as comments on the gerrit page? I need to go sleep. It's 12:30 in the morning. [06:23:07] MtDu__: us, sorry, I need to do some cleaning on my laptop since vagrant is being sluggish [06:23:35] I will review the gerrit patch when that's done [06:24:04] tgr: The current gerrit patch is not right. [06:24:39] test it and see if I can figure out what's wrong with GENDER, I mean [06:24:41] tgr: All I did was change the unit test to have the GENDER in it, so it would pass. But you can still comment on it. [06:24:51] tgr: Oh ok. [06:25:13] tgr: Keep me posted then. Night! [06:25:27] night [08:29:39] (03CR) 10Gergő Tisza: "Okay, so the problem is a lot simpler than I assumed. getCreditText(), which is the function you changed, passes its tests (so GENDER does" [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) (owner: 10MtDu) [08:38:01] (03CR) 10Gergő Tisza: [C: 04-1] Add gender support to Multimediaviewer-text-embed-credit-text-tbls and other messages (036 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) (owner: 10MtDu) [08:55:57] (03CR) 10Gergő Tisza: "Tested by changing the English message (via the MediaWiki:Multimediaviewer-text-embed-credit-text-tbls-nonfree wikipage) to be gender-depe" [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) (owner: 10MtDu) [09:05:29] (03CR) 10Gergő Tisza: "I don't think passing the username is enough in Javascript - that only works in PHP. In JS either an mw.User object is needed (which is no" [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) (owner: 10MtDu) [12:57:59] MatmaRex: o/ [14:07:31] hi prtksxna [14:18:50] (03CR) 10Bartosz Dziewoński: [C: 04-1] "You only did half of each of the two pieces of work here." [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (owner: 10Ananay) [14:21:39] 6Multimedia, 10UploadWizard, 7Easy, 3Google-Code-In-2015, and 2 others: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead - https://phabricator.wikimedia.org/T120627#1894730 (10matmarex) https://gerrit.wikimedia.org/r/260327 [14:31:55] (03PS2) 10Ananay: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 [14:34:13] (03CR) 10Aklapper: "https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines - this is missing the reference to the Phabricator task and the lines are " [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (owner: 10Ananay) [14:34:43] (03CR) 10jenkins-bot: [V: 04-1] Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (owner: 10Ananay) [14:37:52] (03PS3) 10Ananay: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 [14:41:28] (03CR) 10jenkins-bot: [V: 04-1] Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (owner: 10Ananay) [14:51:09] (03PS4) 10Ananay: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (https://phabricator.wikimedia.org/T120627) [14:53:49] (03CR) 10jenkins-bot: [V: 04-1] Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (https://phabricator.wikimedia.org/T120627) (owner: 10Ananay) [14:56:52] (03CR) 10Bartosz Dziewoński: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead in UploadWizard (Wikimedia) (032 comments) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (https://phabricator.wikimedia.org/T120627) (owner: 10Ananay) [15:06:02] (03PS5) 10Ananay: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (https://phabricator.wikimedia.org/T120627) [15:06:27] Such noise [15:07:51] (03CR) 10Bartosz Dziewoński: [C: 032] Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (https://phabricator.wikimedia.org/T120627) (owner: 10Ananay) [15:09:04] poor marktraceur [15:09:06] 6Multimedia, 6Commons: A new panoramic viewer for commons - https://phabricator.wikimedia.org/T105789#1894815 (10MarkTraceur) p:5Triage>3Normal [15:09:23] I'm good. I'm going to make noise as revenge. [15:11:48] (03Merged) 10jenkins-bot: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260327 (https://phabricator.wikimedia.org/T120627) (owner: 10Ananay) [15:12:21] (03PS4) 10MarkTraceur: Kill polling for moveFileInputToCover [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260059 (https://phabricator.wikimedia.org/T121901) [15:12:43] MatmaRex: My bad, I left a 250 in from when I was debouncing at those lines instead of at the function definition [15:13:18] 6Multimedia, 10UploadWizard, 7Easy, 3Google-Code-In-2015, 7Technical-Debt: Remove JS adding/removing 'hover' CSS class, use :hover pseudoclass instead - https://phabricator.wikimedia.org/T120627#1894830 (10matmarex) 5Open>3Resolved a:3ananayarora [15:13:19] (03CR) 10MarkTraceur: Kill polling for moveFileInputToCover (031 comment) [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260059 (https://phabricator.wikimedia.org/T121901) (owner: 10MarkTraceur) [15:14:23] 6Multimedia, 6Commons, 10MediaWiki-Uploading: Commons private-to-public setting - https://phabricator.wikimedia.org/T111792#1894837 (10MarkTraceur) p:5Triage>3Normal Yeah, how is this different from the stash? [15:14:41] Argh I made it worse [15:14:54] Now every wikibugs message pings me and I get noise on my computer and on my phone [15:15:02] I regret everything [15:21:03] 6Multimedia, 6Commons, 10Wikimedia-General-or-Unknown: Cryptic "413 Request Entity Too Large" error when uploading new version of >100MB file on Commons - https://phabricator.wikimedia.org/T115984#1894857 (10MarkTraceur) p:5Triage>3Normal [15:21:05] Maybe I should unignore wikibugs and gerrit. I miss out on so much fun. [15:22:07] 6Multimedia, 10MediaWiki-Uploading: Special:Upload shouldn't try stashing files for anonymous users - https://phabricator.wikimedia.org/T115822#1894859 (10MarkTraceur) p:5Triage>3Normal [15:22:46] prtksxna: I had a good setup when I had them ignored in team channels, but I was also in -feed [15:23:13] marktraceur: I don't know how to setup per channel ignore on this client. [15:23:27] That's why I'm stuck in the dark pit of despair also [15:23:44] Accursed newfangled convenient technology [15:25:10] Is this even a client specific thing? Shouldn't I be able to type the right command? [15:26:45] No, ignore is a client-specific implementation detail [15:26:56] It's not the server not sending you messages from wikibugs, it's your client discarding them [15:27:30] Or not displaying them, as the case may be [15:28:49] marktraceur: oh :( [15:32:06] mw.Upload.Dialog is broken because of mw.Upload.BookletLayout :] [15:32:08] * :\ [15:32:30] prtksxna: We got a bug for that? [15:32:58] marktraceur: I don't think so [15:32:59] * prtksxna looks [15:33:26] I mean, it's either that or you just found something and nobody else has noticed [15:33:36] But I guess what I'm really asking is, how is it broken? [15:34:01] tgr_: https://dpaste.de/OerL#L363 Are you talking about line 363? [15:34:19] marktraceur: Calling something that doesn't exist, possibly because of a typo https://gerrit.wikimedia.org/r/#/c/260384/ [15:35:02] Ooh, I hate it when that happens [15:35:05] That was probably me [15:35:35] Merging [15:36:44] Thanks :) [15:37:17] I wonder how we could get notifications about cross-wiki upload stuff in here [15:40:32] tgr_: https://dpaste.de/OerL#L363 Are you talking about line 363? Or are you talking about the actual function? [15:41:08] MtDu: Hey, are you still talking about the same patch? [15:41:25] +marktraceur: Yep. Look at tgrs last comment, I don't quite understand it. [15:42:40] MtDu: You need to get the gender value out of userInfo in that callback, and somehow keep it so your code can use it [15:43:26] +marktraceur: Could you explain a bit more? [15:43:37] MtDu: You understand what the problem is, right? [15:44:03] +marktraceur: GENDER is not working in getcredithtml. Because the lastUploader isnever passed? [15:45:13] MtDu: GENDER won't work with lastUploader in JavaScript because the JS library that parses messages doesn't support GENDER with usernames. [15:45:40] +marktraceur: So I need to get the actual gender. [15:46:07] (03CR) 10Bartosz Dziewoński: [C: 032] Kill polling for moveFileInputToCover [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260059 (https://phabricator.wikimedia.org/T121901) (owner: 10MarkTraceur) [15:46:45] MtDu: Right, which is in the userInfo object at the line you linked to [15:47:00] So you need to save it somewhere and use it for the GENDER call. [15:48:13] (03PS1) 10Bartosz Dziewoński: Remove some dead CSS [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260386 [15:48:23] So where is it in this line? viewer.ui.panel.setImageInfo( image, imageInfo, repoInfo, userInfo ); [15:49:21] (03Merged) 10jenkins-bot: Kill polling for moveFileInputToCover [extensions/UploadWizard] - 10https://gerrit.wikimedia.org/r/260059 (https://phabricator.wikimedia.org/T121901) (owner: 10MarkTraceur) [15:50:05] MtDu: "[it] is in the userInfo object" --marktraceur five minutes ago [15:51:31] prtksxna, MatmaRex, looks like we've got a ball game for the standup today, right? [15:51:51] I tried to hard for that mannerism. [15:53:03] * MatmaRex googles the idiom [15:53:15] Basically, are we having the standup [15:53:19] Because we are all here [15:53:25] :D [15:53:30] * marktraceur should never try to be folksy, it's not his bag [15:53:37] i'm around, can chat [15:53:38] * prtksxna looks for a ball [15:53:44] prtksxna hush [15:53:56] :P [15:54:11] Are we having an IRC meeting instead? [15:58:25] No, it's not time yet [15:58:33] Sorry I was just asking if we were cancelling [15:59:48] *now* it's time. [16:01:27] aaa [16:02:04] +marktraceur: I'm still confused. I can't seem to find the gender. Is it here? https://dpaste.de/sdAV [16:07:12] MtDu: The line you linked to, the one that called setImageInfo, has a variable in it called userInfo. That object *has the gender variable that you need*. [16:07:26] MtDu: It's not used anywhere currently, so looking for the word "gender" in the code won't help you. [16:07:58] +marktraceur: When I look around for userInfo, I don't find it. How do you know it has Gender in it? [16:08:21] Because the API returns the gender for the user, that's the point [16:08:28] MtDu: https://dpaste.de/OerL#L363 [16:08:44] 6Multimedia, 10UploadWizard, 7Performance: UploadWizard UI performance abysmal when adding many files to upload at once - https://phabricator.wikimedia.org/T121901#1894937 (10matmarex) [16:09:34] +marktraceur: So how do I get the gender and pass it to the function I need it in? [16:09:54] Well, that's the trick [16:10:40] MtDu: Looking [16:13:53] MtDu: OK, it took a lot of grepping and following of code, but I've got it. [16:14:04] MtDu: in mmv.js, look for "setFileReuseData" [16:14:24] +marktraceur: Got it. [16:15:04] grep -rn is your friend [16:15:11] MtDu: That function calls this.downloadDialog.set, which calls this.download.set, which calls this.setAttributionText, which calls this.formatter.getCreditText. [16:15:28] MtDu: You have to pass userInfo, or at least the gender, along that entire chain. [16:16:00] Hydronium: -rin is my jam [16:16:15] +marktraceur: Like this? https://dpaste.de/squx [16:16:19] Mostly because UploadWizard is stupid when it comes to naming conventions [16:16:28] MtDu: Roughly yes. [16:16:31] ooh, case insensitive [16:16:33] fancy [16:17:12] +marktraceur: What do you mean? Is it still wrong? [16:17:26] +marktraceur: And how did you know what the function claled? [16:17:26] Wait a minute. [16:17:34] Now I'm doubting the whole gender thing [16:18:03] +marktraceur: yeah. It still fails the Qunit test. [16:18:11] Oh, qunit is useless [16:20:04] +marktraceur: Ok. [16:20:16] OK, no, I was wrong about which API module was being used [16:20:18] +marktraceur: So the adding a userInfo.gender is not right. [16:20:24] +marktraceur: Ok [16:20:28] meta=userinfo doesn't give me gender, but list=users does [16:20:48] And yes, userInfo.gender is right [16:20:51] So pass that along [16:21:07] +marktraceur: Ok. [16:21:29] +marktraceur: What else do I need to do? [16:21:57] Well, pass that gender into the message as the last parameter like we planned to do with the username [16:22:23] +marktraceur: like this? https://dpaste.de/mSH4 [16:22:41] That is how you add an argument to a function, yes. [16:23:49] +marktraceur: Ok. So now, how do I pass that to getCreditHtml? [16:24:30] MtDu: My message above where I said "That function calls X, which calls Y, which calls Z"? Follow every single one of those calls and pass the gender through to them. [16:24:52] MtDu: Eventually you come to one that calls getCreditText and getCreditHtml, so then you have to pass the gender in to both. [16:25:00] MtDu: Then you can work on the functions themselves. [16:25:05] +marktraceur: Ok. How did you know that was the order? [16:25:41] Because I actually read through the code [16:26:36] +marktraceur: Derp. I'm stupid. it was right there the whole time. [16:26:52] You're not stupid, it's a complicated project [16:27:39] +marktraceur: So do I need to pass the gender into fileReuse.set as well? https://dpaste.de/D372 [16:28:19] Well, that's arguably a good idea [16:28:28] I guess the bug says "and other messages" [16:28:34] So yeah, might as well get the fileReuse ones too [16:30:08] +marktraceur: Ok. [16:30:43] +marktraceur: So I need to pass parameter every time the function this.download.set is called? [16:31:35] MtDu: All two times, yes. [16:31:45] MtDu: That means saving the gender in setValues [16:33:44] +marktraceur: Is this right? https://dpaste.de/FHTs#L60,65,84 [16:35:06] MtDu: What's the value of userInfo in DP.openDialog? [16:35:36] UND [16:35:49] So why are you trying to access userInfo.gender? [16:36:02] So can I pass in userInfo into the function? [16:36:13] No, because it gets called as a callback. [16:36:33] MtDu: Where do the other two arguments come from? [16:37:25] +marktraceur: this.setValues, so it should be this.setValues.gender [16:37:30] Yup! [16:37:58] Does that mean the upper portion is wrong? https://dpaste.de/ZOOX#L1,3,8 [16:38:18] Partly, but not the part you think [16:38:28] MtDu: What's the value of userInfo in DP.set? [16:38:41] UND. [16:38:45] Why? [16:38:54] It's not passed in. [16:38:59] So do I just pass userInfo in? [16:39:01] Isn't it? [16:39:11] I thought we just added userInfo to the only call to this function. [16:40:30] We did it here? this.downloadDialog.set( image, repo, userInfo.gender ); [16:40:54] Uhhh [16:41:15] MtDu: I fear you might be doing the same thing in every function. Are you passing userInfo.gender into each one? [16:41:33] Yeah. So far. [16:41:35] Because if you collapsed that chain of operations it would look like you were accessing userInfo.gender.gender.gender.gender.gender [16:41:58] And as interesting as it might be to know the user's meta-meta-meta-meta-gender, I don't think we're allowed to collect that information. [16:42:25] Let's just pass in userInfo.gender and then call it "gender" instead of "userInfo" from then on. [16:43:33] +marktraceur: Ok. So I start with this.downloadDialog.set [16:43:54] And pass in userInfo.gender [16:44:11] Into that and the fileReuse.set [16:44:29] Well, you start in mmv.js at the call to viewer.ui.setFileReuseData [16:44:53] yeah. I did that. [16:45:01] userInfo.gender [16:45:14] Then I did it to the two functions above. [16:45:31] But that's the cause of the userInfo.gender.gender.gender.gender problem. [16:45:45] So only use userInfo in mmv.js, the rest of the time, it's just gender. [16:45:57] +marktraceur: Gotcha. [16:46:28] So now I'm on this.download.set. [16:46:39] Is this right? https://dpaste.de/Y4fT [16:46:50] Or do I need to change line 8 to just gender? [16:47:30] MtDu: It should only be gender, userInfo is not present outside of mmv.js [16:47:37] Ok. [16:47:43] The only, only, only, only, only file you should be adding userInfo to is mmv.js [16:47:52] If it is getting added in any other part of the project, you are doing it wrong [16:48:06] Now, finally, what is the value of gender in DP.set? [16:48:42] Just gender. Because userInfo is only in mmv [16:48:52] No, not the name, the value [16:51:04] UND? [16:51:15] Correct. Why? [16:51:15] Do I need to pass gender into the function itself as a parameter? [16:51:41] It needs to be passed into the function itself as a parameter. [16:51:44] Not pass, but yes, you need it to be a parameter [16:51:59] So DP.set = function ( image, repo, gender ) {? [16:52:02] It's getting passed in, but you can only refer to it currently as arguments[2] which is not very fun [16:52:04] Yup! [16:52:18] Ok. So. Now onto setAttributionText [16:52:35] https://dpaste.de/UtcW. The correct way to do it is the first line right? [16:53:12] Uhhh, no [16:53:17] I think [16:53:22] Sec. [16:54:45] MtDu: Yeah, no, EmbedFileInfo doesn't have a place for gender, so you'd do better just passing gender in separately I think [16:55:03] Though maybe it would be better to add it [16:56:52] +marktraceur: Should I? [16:57:10] Yeah, if you can sort it out, add a gender field to EmbedFileInfo [16:58:33] +marktraceur: https://dpaste.de/ERZf. What comment do I need to include? [16:58:58] Follow the format of what's there already [16:59:38] +marktraceur: Gender is a string right? [16:59:49] Yup [17:00:37] This look good? https://dpaste.de/1CU7 [17:01:10] Hmm [17:01:21] MtDu: You might want to put it before caption, and make it required [17:01:35] Or at least give it a sane default, 'unknown' [17:03:26] This better? https://dpaste.de/61PR [17:03:45] MtDu: The documentation is out of order now [17:03:49] But otherwise mostly good [17:03:58] https://dpaste.de/zB9N [17:04:19] MtDu: Make it "this.gender = gender || 'unknown';" and make the documentation @param {string} [gender='unknown'] [17:05:06] https://dpaste.de/50ec [17:05:41] The documentation for the constructor needs the [gender='unknown'] thing [17:06:09] * marktraceur closes twenty dpaste tabs [17:06:30] https://dpaste.de/WpVg [17:06:43] +marktracuer: Lol. Sorry [17:06:48] All right, that looks fine [17:07:06] So now, setAttributeText should look like. https://dpaste.de/cLts [17:07:09] So then pass the gender in to the constructor for the EFI instance, then use info.gender in the setCredit* methods [17:07:15] Yup [17:07:24] marktraceur: Secure Shell over Human [17:07:40] Also, you'll need to make sure other places where EFI is used don't get screwed up by the change in parameter order [17:12:18] I don't see any. Do you? https://dpaste.de/BQC6 [17:12:43] I don't need to add the gender paramter to everywhere the function is called do I? [17:13:13] Yes. [17:13:16] Sorry [17:13:24] Yes to the first question, sort of to the second question. [17:13:49] https://dpaste.de/MqLe [17:14:13] Ok. [17:17:07] 6Multimedia, 6Commons, 10MediaWiki-File-management: File does not show immediately up after moving - https://phabricator.wikimedia.org/T117535#1895211 (10MarkTraceur) p:5Triage>3Normal [17:17:47] 6Multimedia, 7Easy: WebRequestUpload looks for header CONTENT_LENGTH Instead of CONTENT-LENGTH - https://phabricator.wikimedia.org/T118673#1895213 (10MarkTraceur) p:5Triage>3Normal [17:19:16] 6Multimedia, 10MediaWiki-API, 10MediaWiki-Uploading: File on remote repository causes same duplicate warning as file on local repository - https://phabricator.wikimedia.org/T120243#1895223 (10MarkTraceur) p:5Triage>3Normal [17:21:10] +marktraceur: https://dpaste.de/7LYA In the order you sent them. Please check. [17:21:36] MtDu: OK, do all of those calls actually get a gender? [17:21:58] Nope. [17:22:05] So the ones that don't I put a {}? [17:22:07] So...um...that won't work [17:22:13] No, because gender isn't an object [17:22:31] Also you put them in different orders [17:22:43] At least the last two are wrong [17:23:10] I think the highlighted ones are wrong order. https://dpaste.de/7LYA#L7,10,11 [17:23:20] So what do I do if gender isn't actually used? [17:23:28] Is gender used in any of those? [17:24:09] If you can get gender in a function, then use it [17:24:21] If not, put false or 'unknown' [17:24:40] I hope you're following what's going on and not just blindly changing things here [17:25:11] 6Multimedia, 6Commons, 10MediaWiki-File-management: Renaming in Commons creates "No file by this name exists" message; works after reload - https://phabricator.wikimedia.org/T120054#1895235 (10MarkTraceur) p:5Triage>3Normal [17:25:39] +marktraceur: I get that I need to get the order right now that I changed the EmbedFileInfo.js, but I don't get the gender part and how to see if it's used in each case. [17:27:11] You don't get the gender part? That's the central part of the bug. [17:28:20] No I get that. Like the part where you say [11:24] <+marktraceur> If you can get gender in a function, then use it [11:24] <+marktraceur> If not, put false or 'unknown' [17:28:49] MtDu: OK, in the test files, probably just pass in 'unknown' because it doesn't matter [17:28:56] Ok. [17:29:00] MtDu: In the function we already changed, we have gender, so we use it. [17:29:06] Yeah. [17:29:14] So in https://dpaste.de/7LYA#L7,10,11 [17:29:22] The order is wrong. Where should the gender be? [17:29:53] Look at the documentation for the EmbedFileInfo constructor, which you *just wrote* [17:30:10] After imageInfo, repoInfo [17:30:19] Right. [17:30:21] repoinfo is a url, so I thought gender went after that. [17:30:33] repoInfo isn't a url. [17:30:36] It's an object. [17:30:56] Oh ok. The documentation says. /** @property {mw.mmv.model.Repo} repoInfo The URL to the original file */ this.repoInfo = repoInfo; [17:31:02] Uhhh [17:31:05] So I got confused. [17:31:09] Well that's wrong, but we can deal with that later [17:32:21] Ok. So gender should be 3rd not 4th? [17:32:34] Yes [17:32:36] aka 'unknown' [17:34:07] So should the 6th one be embedFileInfo = new mw.mmv.model.EmbedFileInfo( {}, {}, 'unknown' );? [17:34:14] Yeah [17:38:01] +marktraceur: Hopefully, this is right now. https://dpaste.de/Qv5e [17:39:46] MtDu: Those first two aren't test cases, they're the two places we actually want gender support [17:40:01] Woops. [17:40:05] We literally are passing in the gender variable so we can pass it to this constructor [17:40:24] It's OK, just try not to miss the forest for the trees [17:40:26] Yeah. in the test cases it's unknown. But in the actual files it's gender because we use it. [17:40:35] I like that idiom. :) [17:41:11] Is the ball game in the forest? [17:41:20] So just change them to gender and that's it? [17:41:28] Yeah, should be [17:41:39] But then you'll need to fix the second one, because it doesn't get gender passed in yet [17:42:21] What do you mean? this.embedFileInfo = new mw.mmv.model.EmbedFileInfo( image, repo, gender, caption, alt ); [17:42:37] No, I mean, the call above that [17:42:54] this.setAttributionText( new mw.mmv.model.EmbedFileInfo( image, repo, gender ) ); [17:42:56] That one? [17:42:59] mmv.ui.reuse.embed.js [17:43:12] Yeah that's this one. this.embedFileInfo = new mw.mmv.model.EmbedFileInfo( image, repo, gender, caption, alt ); [17:43:15] EP.set at line 429 [17:43:27] Does not receive gender. [17:43:27] Yeah. That's at line 437 [17:43:29] Ok. [17:43:48] https://dpaste.de/C7b9 [17:43:53] You need to add it as a parameter just like we did in DP.set and follow the call stack up to where gender is already [17:44:02] Yes, I know, I have the code [17:44:24] So in line 429, add gender as paramter. [17:44:37] Or wherever EP.set is [17:44:43] My code is maybe slightly out of date [17:44:53] Do I have to do it for the first one too? [17:45:03] You already did, that's DP.set [17:45:11] Er wait [17:45:21] Yeah, that's right [17:45:50] I don't have to add anything in the highlighted places? https://dpaste.de/f3wE#L1,19 [17:46:54] +marktraceur:^ [17:47:07] Oh, yeah. I thought we already did that. [17:47:47] I don't think we need to check if gender got passed in, you can pass in an undefined, it will be 'unknown' which is fine [17:47:51] But it needs to be a parameter [17:48:54] +marktraceur: So like https://dpaste.de/evSE#L1,19? Still don't add anything to line 19? [17:49:20] Yeah that should be fine [17:49:31] Ok. Now onto the getAttribution. [17:49:35] As long as we come back and pass gender into DP.set which I cannot remember if we have done already [17:50:52] I think we have. https://dpaste.de/3ixq [17:51:40] +marktraceur: https://dpaste.de/m9YR Is that right? [17:51:43] Right, looks good [17:51:47] Uhhh looking at the second one [17:52:02] Errr, no because we added gender to the EmbedFileInfo object [17:52:18] You don't need to add another parameter, in fact, you don't need to touch that part [17:52:30] Right. [17:52:31] Just go into getCredit* and use info.gender where you need it [17:53:41] I only need it in getCreditHTML right? Because that's the one that failed? [17:54:01] Failed what, the qunit tests? Ignore those, we aren't fixing a test, we're adding a feature [17:54:36] You can fix the tests after the thing is actually working [17:55:17] Ok. https://dpaste.de/bq8T. I don't need to touch getCreditText do I? [17:58:19] MtDu: Yes, you do. The bit where you push the lastUploader in as the last parameter needs to change to you pushing in the gender. [17:59:07] +marktraceur: Ok. And for the getCreditHtml, do I just push gender? https://dpaste.de/OnEZ [17:59:54] Yeah, just like how getCreditText works [18:00:19] +marktraceur: Do I even need the else clause? Didn't we set gender to 'unknown' by default? [18:03:05] MtDu: Well, you do [18:03:16] MtDu: Because the else clause is for when lastUploader and author are different [18:03:33] +marktraceur: Ok. I remember adding that in. So is it like this? https://dpaste.de/YBMW [18:03:51] +marktraceur: Do I need to change line 81 to .text? [18:04:15] +marktraceur: Could you tell me the difference? [18:04:35] That's correct [18:04:40] Uhh [18:04:46] Line 81...hm [18:04:54] If anything I'd say it should be html() but I'm not sure [18:04:56] Or parse() [18:05:02] God I hate i18n sometimes [18:05:10] MtDu: Can you test it, maybe? See how it looks now? [18:08:13] +marktraceur: My qunit isn't showing. http://127.0.0.1:8080/wiki/Special:JavaScriptTest/qunit/plain# [18:08:17] I go there, but the page doesn't load. [18:09:34] +marktraceur: Vagrant is running properly, because I can go to the 127.0.0.1:8080 [18:10:02] Uhh [18:10:05] Do you want me to restart my computer? [18:10:10] No [18:10:11] http://127.0.0.1:8080/wiki/Special:JavaScriptTest/qunit [18:10:27] I don't know wtf /plain was but I don't think you need it. [18:10:28] It says choose a skin to run the tests with. [18:10:36] Oh. [18:10:38] Weird [18:10:45] MtDu: What error do you get at /plain? [18:11:14] I don't get an error. It just doens't load the page. [18:12:16] +marktraceur: Do you want me to screenshot? [18:12:47] MtDu: Check the network tab of developer tools. [18:12:54] There's an error message, you just haven't found it yet [18:13:11] So go to http://127.0.0.1:8080/wiki/Main_Page [18:13:32] What? [18:13:46] Where do I go to the network tab [18:13:54] No, go to the qunit page, open developer tools, open the network tab, then click on the plain link [18:14:29] So here? http://127.0.0.1:8080/wiki/Special:JavaScriptTest/qunit [18:14:48] Yes, now open developer tools. [18:15:03] Where? [18:15:08] What browser are you using? [18:15:19] Chrome [18:15:25] Do I right click and inspect? [18:15:27] Shift+Ctrl+J [18:15:44] That opens dev tools. It is your best friend. [18:15:46] I'm on mac. [18:15:47] Go to the network tab. [18:15:57] Ugh, well, Shift+Apple+J probably [18:16:08] I got it. I right clicked and inspected. [18:16:14] Alright I'm at network tab. [18:16:41] OK, now, load the /plain page [18:16:49] And watch the network tab while it's loading [18:16:49] +marktracuer: When I load the page. It displays an error. https://dpaste.de/foBn [18:17:17] I don't see an error there, just a URL [18:17:41] +marktraceur: https://dpaste.de/s4X7 [18:18:13] OK, try http://127.0.0.1:8080/wiki/Special:JavaScriptTest/qunit/plain?debug=true [18:18:42] It works [18:20:16] I get lots of errors. [18:20:27] Well, that's OK [18:20:29] What do you want me to run it on [18:20:47] Right now, I'm running it on mmv.EmbedFileFormatter [18:21:07] That's probably a good start [18:21:19] But you should have it passing on all of the MMV tests, hopefully [18:21:26] Unless you determine the errors have nothing to do with you [18:22:08] +marktraceur: There's a lot more errors than before. [18:22:20] Well, time to start figuring out why! [18:22:39] +marktraceur: https://dpaste.de/xRR5 [18:23:07] Would you mind taking a crack at it before asking me? [18:23:44] +marktraceur: Sure. It scares me that Im getting so many errors though. [18:23:50] 6Multimedia, 6Commons, 10MediaWiki-Uploading, 7JavaScript, 5Patch-For-Review: Cross-wiki-upload adds "null" as author - https://phabricator.wikimedia.org/T121097#1869039 (10matmarex) [18:24:41] +marktraceur: Hey I fixed a lot of them now! I'll keep working on it. This is very fun. [18:26:03] Usually getting lots of errors means you made one mistake in a place that a lot of tests rely on. [18:26:32] +marktraceur: I don't understand what this means. https://dpaste.de/2JHT [18:28:08] MtDu: Look at mmv.HtmlUtils.js and search for wrapAndJquerify [18:28:47] Ok. [18:30:59] +marktraceur: Does this mean that the thing that's being passed it not an html element? https://dpaste.de/xfLs [18:31:15] I'm not opening that dpaste, but yes, that's why that error is raised. [18:33:12] +marktraceur: When I took these lines out, the test passed (still 1 failed). https://dpaste.de/g4v0#L29,30,31,32,33 [18:34:34] MtDu: Maybe because the test doesn't expect there to be a gender parameter for some reason. [18:34:48] MtDu: Removing those lines ruins all of the work you've done. [18:35:22] +marktraceur: Yep. That was the problem earlier. It wasn't taking the GENDER out. https://dpaste.de/G11Y [18:35:39] +marktraceur: Now it says GENDER unknown, it used to say GENDER $4/5 [18:36:00] OK [18:36:12] You need to change how that gets called, .plain() obviously doesn't work [18:36:46] It shouldn't say {{GENDER|unknown}} in the message text, so use .text() or .plain() or something [18:36:57] +marktraceur: Can you explain the difference between them? [18:37:07] Not adequately [18:37:32] +marktraceur: Well. Changing it to .text fixes error #7! Which was my goal. :) [18:37:43] But. Error 4 still remains. [18:38:08] +marktraceur: Which is this one. https://dpaste.de/juw8 [18:41:14] +marktraceur: So the error seems to come from line 10. Which depends on lines 3 and 5. [18:41:18] +marktraceur: EFFP.getCreditHtml = function ( info ) { var creditText, creditParams, titleText = info.imageInfo.title.getNameText(), titleUrl = this.getLinkUrl( info ), $title = $( '' ).text( titleText ).prop( 'href', titleUrl ), byline = this.getByline( info.imageInfo.author, info.imageInfo.source, info.imageInfo.attribution ); creditParams = [ 'multimediaviewer-html-embed-credit-text-t', this.h [18:41:32] +marktraceur: https://dpaste.de/gsUn#L3,5,10 So the error seems to come from line 10. Which depends on lines 3 and 5. [18:43:44] MtDu: Any ideas? [18:44:36] +marktraceur: Wait. i think the error might be in this line. https://dpaste.de/gsUn#L29 Because the error thrown is wrapandjquerify: unknown type. [18:45:12] That's probably right [18:48:54] +marktraceur: So it works in getCreditText but not getCreditHtml. [18:49:26] OK. Why? [18:54:44] Wait sorry. I'm wrong. The error's in this function. https://dpaste.de/sHEo Trying to figure out why. [19:02:55] +marktreucer: So it fails starting line 61. [19:03:33] +marktreucer: That's when author and source is not passed. [19:04:30] MtDu: OK, so, why aren't they? [19:04:43] Why aren't they what? [19:06:36] +marktreucer: No bylines are passed. [19:07:08] Right, why not? I'm not even looking at the code anymore, I want you to tell me what's happening [19:07:44] +marktreucer: It wants the author and source to not appear. [19:07:55] In what case? [19:08:07] +marktreucer: When the license and site are passed in, but not he bylines [19:08:33] Well, that makes sense, that when the author and source aren't present, the author and source shouldn't be present. What's the problem? [19:09:12] +marktreucer: It fails on that set of tests. there is a wrapandjquerify: unknown type error. [19:09:51] MtDu: OK, but surely "the author and source aren't present" wouldn't cause a type error. What type *is* being passed in? [19:10:50] null? [19:11:27] OK, well that's not very helpful, so maybe you need to figure out what to pass in that the method will actually be able to help you with. [19:11:45] Obviously it wasn't null before you changed things, so what happened that changed it to null? [19:12:15] I'm not sure if it is null. Is it? [19:13:02] I don't know, again, I'm not looking at the code anymore [19:13:30] Ok [19:13:45] I think you can figure this out, is all [19:14:08] +marktraceur: Can you give me a hint? [19:14:25] A hint? I don't even know what the problem is [19:18:53] +marktreucer: So it's giving me a type error. The only thing that changed was that I added a gender to info. I didn't touch the function that's failing. [19:19:20] +marktreucer: So does that mean the error is because of the added gender? [19:19:39] Seems likely [19:20:28] +marktreucer: But then it would have failed on the first two tests as well. [19:20:44] Maybe. Maybe something's different about the third test. [19:21:07] It's just that byline is not passed in. [19:21:35] OK, so what does that change about what the functions do? [19:21:56] First one is bylines, license, and site. Second is bylines, no license and site. Last is none of them. [19:22:19] Right, so if nothing is passed in, what changes about what happens in the function? [19:23:40] It causes this to push 'unknown'. if ( this.htmlUtils.htmlToText( info.imageInfo.author ) === info.imageInfo.lastUploader ) { creditParams.push( info.gender ); } else { creditParams.push( 'unknown' ); } [19:24:07] Are you sure? What happens in htmlToText if info.imageInfo.author is undefined? [19:25:37] It can't call the method wrapAndJquerify [19:25:51] Well it can. [19:26:00] But it'll throw the error, because the author isn't html or a string [19:26:02] It's null. [19:26:07] Well, undefined [19:26:11] Yeah. [19:26:17] But yeah. So maybe you shouldn't call that function if author is undefined. [19:26:57] Which is actually something I told you a while ago - if author, lastUploader, and byline aren't *all* defined, you shouldn't even look at them [19:29:53] Where do I add this if clause? [19:30:25] I think you can figure that one out, mate [19:34:51] So ex. If I wanted to check if a was defined I would do if ( a )? [19:35:19] Well, it's complicated [19:35:43] In this case, you can probably get away just checking that it's not undefined. [19:35:49] Which is a !== undefined [19:38:41] So is this right? if ( info.imageInfo.author !== undefined && info.imageInfo.lastUploader !== undefined && byline !== undefined) { [19:40:44] Partly, yes. [19:40:51] What's wrong with it? [19:40:54] Where are you putting it? [19:41:12] https://dpaste.de/DvzR#L14 [19:41:44] What on earth, we weren't talking about that function at all [19:42:00] +marktraceur: Wait. I got it. One sec. [19:42:45] https://dpaste.de/jiv1 [19:43:08] https://dpaste.de/TsSr [19:43:36] What if they are undefined? What should gender be? [19:45:08] unknown [19:45:31] And what is it now? [19:45:39] What do you mean? [19:45:58] If author, lastUploader, or byline are undefined, what gets passed in for the gender argument? [19:46:05] 6Multimedia, 10UploadWizard, 7Easy, 3Google-Code-In-2015, 7Technical-Debt: Use OO.ui.confirm() for the confirmation dialog in uw.controller.Details.prototype.valid - https://phabricator.wikimedia.org/T117077#1895623 (10Mhutti1) a:3Mhutti1 [19:46:28] unknown. [19:46:36] Are you sure? [19:46:36] RIght now, nothing is passed. [19:46:40] Yeah. [19:46:47] So I add an else clause? [19:46:49] Now, hold on for a sec, because I actually think that's correct [19:46:50] No [19:47:21] OK [19:47:33] MtDu: If there is no byline, what should happen? [19:48:31] No author and no source. [19:48:57] No, that's *why* there is no byline. [19:49:05] That's the *cause*. [19:49:08] What should be the *effect*? [19:49:36] It doesn't get pushed to params. [19:50:25] The byline? [19:50:28] Or something else? [19:50:46] Well. byline and gender both don't get passed. [19:51:27] Right! [19:51:43] MtDu: OK, what if there *is* a byline, but there is no author? [19:52:01] no gender, but byline gets pushed. [19:52:06] Right. [19:52:12] And what if there is a byline, but no source? [19:52:22] gender and byline. [19:52:35] Oh, wait, no, I'm sorry [19:52:46] If there is no author, shouldn't we pass in 'unknown' as the gender? [19:52:53] And the same when there is no source? [19:53:40] Yeah. [19:53:58] Wait. Why 'unknown' when there is no source. ISn't there still an author? [19:54:35] Er, not source, lastUploader [19:54:49] I guess I see what you mean though [19:55:10] Yeah. But they have to be equal ot have a gender. [19:55:21] If author and lastUploader are different, then we push 'unknown' [19:55:23] Right [19:55:57] So...I think I lost my train of thought, but based on your answers, can you come up with a set of if/else if/else statements and blocks that make sense? [19:57:23] I'll try. [20:09:25] +marktraceur: I'm kind of lost in the logic. Can we go through that again? [20:10:38] MtDu: OK. Yes byline, yes author, yes uploader -> gender gets pushed. Yes byline, yes author, no uploader -> gender unknown. Yes byline, no author, yes uploader -> no gender. No byline -> no gender. [20:11:24] so for the last one, gender = undefined? [20:11:47] Just don't push the gender. [20:11:56] So I don't need a case for that. [20:12:02] Right, it's implied. [20:12:05] For the last two. [20:12:29] For the first case. I also have to check if the author and uplaoder are the same right? [20:12:58] Yeah [20:13:10] So split that, if they're different, gender unknown. [20:15:26] 6Multimedia, 10GlobalUsage: Deleted page is shown at "File usage on other wikis" - https://phabricator.wikimedia.org/T29280#1895816 (10Perhelion) [20:15:37] +marktreucer: https://dpaste.de/AtMK [20:15:46] +marktreucer: ALL PASSED!!!!!!!!! [20:16:15] 6Multimedia, 6Commons, 10GlobalUsage: "File usage on other wikis" not updated - https://phabricator.wikimedia.org/T122061#1895825 (10Perhelion) [20:17:33] +marktreucer: Btw, I know that my git remote update and git review on my mac (this machine) doesn't work. Do you have time to help me fix it? Or should I just push the patch via my other computer? [20:17:51] 6Multimedia, 10UploadWizard: Show button, then disable it, instead of not showing it while uploading - https://phabricator.wikimedia.org/T58702#1895826 (10matmarex) [20:20:06] MtDu: Uh, well, what's wrong with it? [20:21:05] +marktreucer: When I do git remote update, it doesn't connect to gerrit, only origin. And when I do git review, it should ask me for my ssh password, but it instead asks me for my username for gerrit and my password for gerrit. [20:21:21] +marktraceur: I think it has something to do with my git file [20:21:35] MtDu: git remote update --all [20:22:04] It says unknown option --all [20:22:11] Uhhh [20:22:27] +marktraceur: I don't have a .git folder in MMV for some reason [20:22:34] Oh, right, it's not git remote update [20:22:42] That's a problem. [20:22:47] MtDu: What does git status say? [20:22:54] Should I copy it over from my windows machine? [20:23:00] No no no no no [20:23:04] What does git status say [20:23:29] https://dpaste.de/E9Yj [20:23:47] OK, you have a .git file, you just don't know what hidden files are. [20:23:53] So that's good [20:24:11] Now, what do you think "git remote update" does? [20:24:45] https://dpaste.de/wZRC [20:24:53] But I haven't committed yet. [20:25:08] I have no idea what that is supposed to mean, really [20:25:17] What are you trying to accomplish with "git remote update"? [20:25:40] It just says to do so here. https://www.mediawiki.org/wiki/Gerrit/Getting_started [20:25:51] That's what I follow when I push patches. [20:25:52] Ugh, documentation is the worst [20:25:56] OK [20:26:04] MtDu: did you maybe do something like https://www.mediawiki.org/wiki/Gerrit/Tutorial#Configuring_git-review ? [20:26:54] https://dpaste.de/HG4K [20:26:58] tgr:^ [20:27:08] tgr: But. Keep in mind I don't have a .git folder in MMV for some reason. [20:27:38] uh, I wanted to say that you shouldn't do that [20:28:29] You do have a .git folder MtDu [20:28:35] Stop saying that, it's not true [20:28:56] +marktraceur: When I look in MMV, I don't see .git folder. [20:29:03] Oh my christ [20:29:10] MtDu: Do ls -a [20:29:16] Welcome to UNIX [20:29:42] 6Multimedia, 10UploadWizard: Add a visible "alert" when uploads are done, even when the user minimized the browser / switched to different tab - https://phabricator.wikimedia.org/T122073#1895861 (10matmarex) 3NEW [20:30:41] +marktraceur: That's interesting. How come I don't see it when I look in Finder? [20:30:50] Because it's a hidden file [20:30:59] All files that start with . are hidden from the normal view [20:31:11] You can do Apple+H to show them I think, I don't know [20:31:22] But it's good that it's hidden because .git shouldn't be dealt with manually [20:31:34] MtDu: gotta run to a meeting but you should check for the options in https://www.mediawiki.org/wiki/Gerrit/Tutorial#Configuring_git-review and make sure they are NOT set [20:31:36] e.g. never, ever copy a .git directory from Windows to a UNIX system [20:31:44] That's just a recipe for disaster [20:32:09] +marktraceur: Ok. This is what I had to add to my config file in Windows to get it to work. [20:32:32] possible places are /.ssh/config, ~/.gitconfig, ~/.config/git-review/git-review.conf [20:32:33] What config file? [20:32:41] .git/config [20:32:47] In the repository? [20:32:56] * marktraceur cringes [20:32:59] In MMV .git folder [20:33:04] Yeah, don't do that [20:33:08] We have git config for a reason [20:33:13] dpaste.de/4naP [20:33:53] OK well, set those config options, maybe it will make git work for you [20:34:18] How do I edit the config file if it's hidden from me? [20:34:25] Is there a command that I can use to open it? [20:35:31] +marktraceur:^ [20:35:33] 6Multimedia, 10UploadWizard: Duplicate all the buttons at the top, too - https://phabricator.wikimedia.org/T122074#1895872 (10matmarex) 3NEW [20:36:05] No need to open it. [20:36:17] MtDu: Run git config help [20:36:56] While cded in MMV or MMV/.git? [20:38:00] 6Multimedia, 10UploadWizard: No way to undo overwriting of filenames after 'copy'ing title from first to (2nd...18th...etc) later files - https://phabricator.wikimedia.org/T116513#1895889 (10matmarex) a:3matmarex [20:38:08] MMV, just...just don't go into .git [20:38:10] Just don't do it [20:38:12] It's not necessary [20:38:37] It's not a hidden directory just for shits and giggles, you aren't supposed to make a habit of going into it [20:40:00] Ok. So how do I get git review working? [20:40:39] git config help [20:40:47] error: key does not contain a section: help [20:40:52] My bad, git help config [20:41:17] https://dpaste.de/DmBP [20:41:52] Yes, I know [20:41:54] It's a man page [20:41:54] Ok. Once I do git help config. [20:41:55] Read it [20:41:58] Ok. [20:43:28] 6Multimedia, 10UploadWizard: No way to undo overwriting of filenames after 'copy'ing title from first to (2nd...18th...etc) later files - https://phabricator.wikimedia.org/T116513#1895924 (10matmarex) p:5Low>3Normal [20:43:56] MtDu: You don't need to read the whole thing, just enough to get your system working [20:45:36] +marktraceur: Ok. I'll read more later. I'll push the patch on my laptop now. [20:46:59] What's the issue? [20:47:57] Git review is not working on my mac. [20:48:04] We fixed it on my windows machine. [20:48:26] When I do git review, it's asking of rmy gerrit username and password, when it should be asking for my ssh password [20:48:53] 6Multimedia, 10UploadWizard: Adding mic language to Commons descriptions and UploadWizard dropdown - https://phabricator.wikimedia.org/T47186#1895953 (10matmarex) 5Open>3Resolved a:3matmarex No idea when this was solved, but a "Micmac" language is available at https://commons.wikimedia.org/wiki/Special:U... [20:50:21] ᕕ( ՞ ᗜ ՞ )ᕗ there should be some docs on it [20:51:40] maybe the donger didn't fit the mood [20:51:44] I thought it did :P [20:52:45] 6Multimedia, 6Commons, 10MediaWiki-File-management: Make image thumbnails interlaced whenever possible - https://phabricator.wikimedia.org/T120032#1895973 (10MarkTraceur) p:5Triage>3Low [20:53:50] (03PS16) 10MtDu: Add gender support to Multimediaviewer-text-embed-credit-text-tbls and other messages [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) [20:54:21] 6Multimedia, 10UploadWizard: Allow users (e.g. me) to upload a picture I've taken of a freely licensed work and license it properly using the wizard. - https://phabricator.wikimedia.org/T121824#1895984 (10MarkTraceur) p:5Triage>3Low [20:56:23] 6Multimedia, 6Commons, 10MediaWiki-File-management, 6Research-and-Data: Implement perceptual/visual image hashing/fingerprinting in MediaWiki for detection of non-exact duplicate uploads - https://phabricator.wikimedia.org/T121797#1895988 (10MarkTraceur) p:5Triage>3Low [20:56:49] 6Multimedia, 10MediaWiki-Uploading: Make ForeignStructuredUpload templates configurable ({{own}}, {{self}}, {{subst:unc}}) - https://phabricator.wikimedia.org/T121633#1895990 (10MarkTraceur) p:5Triage>3Low [20:57:00] 6Multimedia, 10MediaWiki-Uploading: Make ForeignStructuredUpload actually configurable - https://phabricator.wikimedia.org/T121632#1895993 (10MarkTraceur) p:5Triage>3Low [20:57:27] (03CR) 10jenkins-bot: [V: 04-1] Add gender support to Multimediaviewer-text-embed-credit-text-tbls and other messages [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/260221 (https://phabricator.wikimedia.org/T85685) (owner: 10MtDu) [20:59:14] MtDu: Did you follow _all_ of the steps on https://www.mediawiki.org/wiki/Gerrit/Tutorial#Set_Up_SSH_Keys_in_Gerrit ? [20:59:14] 6Multimedia, 10UploadWizard: UploadWizard language selector is not properly sorted in alphabetical order in some languages - https://phabricator.wikimedia.org/T121625#1895996 (10MarkTraceur) p:5Triage>3Low [21:00:33] 6Multimedia, 10UploadWizard: UW fails with filename already existing - https://phabricator.wikimedia.org/T121360#1896009 (10MarkTraceur) p:5Triage>3High This sounds like it might be a serious issue, if there's no indication of an error. [21:01:13] 6Multimedia, 6Commons, 10UploadWizard: Provide a copyright click-through guide in the uploadwizard - https://phabricator.wikimedia.org/T121229#1896015 (10MarkTraceur) p:5Triage>3Low [21:03:27] 6Multimedia, 6Commons, 10MediaWiki-File-management, 6Research-and-Data: Implement perceptual/visual image hashing/fingerprinting in MediaWiki for detection of non-exact duplicate uploads - https://phabricator.wikimedia.org/T121797#1896031 (10matmarex) >>! In T121797#1889149, @Tgr wrote: > There are fairly... [21:05:55] 6Multimedia, 10UploadWizard: Selection of second language for description in UW has a usability issue - https://phabricator.wikimedia.org/T121196#1896051 (10MarkTraceur) p:5Triage>3Normal [21:08:01] +marktraceur: More errors. :( [21:09:36] ༼ノಠل͟ಠ༽ノ ︵ ┻━┻ [21:09:44] MtDu: I see that. You should maybe fix them. [21:09:58] 6Multimedia, 10UploadWizard: New language dropdown at Special:UploadWizard makes selection very tedious - https://phabricator.wikimedia.org/T121971#1896060 (10MarkTraceur) p:5Triage>3Normal [21:10:08] +marktraceur: How come it says these? 20:54:17 resources/mmv/mmv.lightboxinterface.js: line 121, col 56, 'gender' is not defined. 20:54:17 resources/mmv/mmv.lightboxinterface.js: line 122, col 47, 'gender' is not defined. 20:54:17 20:54:17 tests/qunit/mmv/ui/mmv.ui.reuse.embed.test.js: line 121, col 73, 'gender' is not defined. 20:54:17 tests/qunit/mmv/ui/mmv.ui.reuse.embed.test.js: line 165, col 73, 'gender' is not defin [21:10:28] MtDu: At a guess because gender is not defined. [21:11:05] +marktraceur: Didn't we define them as this.gender = gender || 'unknown';? [21:17:46] MtDu: That's not gender, that's this.gender. [21:17:49] +marktraceur: I fixed some. I don't get what's wrong. https://dpaste.de/sHVT [21:18:20] 6Multimedia, 10UploadWizard: Mark UploadWizard Flickr uploads with a separate change tag - https://phabricator.wikimedia.org/T121880#1896075 (10MarkTraceur) p:5Triage>3Low [21:18:37] 6Multimedia, 6Commons, 10MediaWiki-extensions-GWToolset: Mark GWToolset uploads with a change tag - https://phabricator.wikimedia.org/T121877#1896077 (10MarkTraceur) p:5Triage>3Low [21:19:10] 6Multimedia, 10MediaWiki-API, 10MediaWiki-Uploading: Allow action=upload API to tag uploads, like action=edit can - https://phabricator.wikimedia.org/T121876#1896089 (10MarkTraceur) p:5Triage>3Normal [21:19:27] 6Multimedia, 10MediaWiki-Uploading, 10MediaWiki-extensions-OAuth: OAuth file uploads are not properly tagged - https://phabricator.wikimedia.org/T121875#1896091 (10MarkTraceur) p:5Triage>3Low [21:19:44] 6Multimedia, 10MediaWiki-Uploading, 10MediaWiki-extensions-WikimediaEvents: Mark cross-wiki uploads with a change tag, but properly - https://phabricator.wikimedia.org/T121873#1896093 (10MarkTraceur) p:5Triage>3Normal [21:19:54] 6Multimedia, 10UploadWizard: Mark UploadWizard uploads with a change tag - https://phabricator.wikimedia.org/T121872#1896095 (10MarkTraceur) p:5Triage>3Low [21:20:10] That prioritization might look arbitrary, but that's only because it was [21:20:41] 6Multimedia, 10MediaWiki-Special-pages: Special:NewFiles is lame - https://phabricator.wikimedia.org/T121870#1896097 (10MarkTraceur) p:5Triage>3Normal [21:21:13] 6Multimedia, 6Commons, 10MediaWiki-Change-tagging, 10MediaWiki-Uploading: Allow various uploading tools on Commons to mark their uploads with change tags - https://phabricator.wikimedia.org/T121864#1896099 (10MarkTraceur) p:5Triage>3Normal [21:21:48] How could Special:NewFiles be improved? [21:22:28] live updates? [21:22:39] eh, that wouldn't fit with the other New____ pages [21:22:42] 6Multimedia, 6Commons, 10UploadWizard: CC IGO 3.0 licences (BY & BY-SA) in the Wikimedia Upload wizard - https://phabricator.wikimedia.org/T121109#1896108 (10MarkTraceur) 5Open>3declined a:3MarkTraceur I agree - very specialized cases should go through different processes (GWToolset comes to mind) or u... [21:23:24] +marktraceur: I need help fixing these three errors. I fixed the ones above it. https://dpaste.de/iviR [21:23:44] Hydronium: There are blocker tasks that go into more detail. [21:23:56] oh. derp [21:24:13] MtDu: What are the errors? [21:24:13] wow, 2012 [21:24:29] Hydronium: Welcome to MediaWiki multimedia [21:24:34] 2012 is a *new* bug. [21:25:10] +marktraceur: I'm starting with 10. It tells me. imageInfo and repoInfo and gender are required and must have a value [21:25:24] +marktraceur: So one of them is probably either not passed in or not defined. [21:25:31] * Hydronium gets to work [21:25:32] OK, so chase down that error and figure out why it's an issue, then fix it [21:25:39] :) [21:27:52] 6Multimedia, 10MediaWiki-Uploading, 7Community-Wishlist-Survey: Enhance image uploading process - https://phabricator.wikimedia.org/T120745#1896124 (10MarkTraceur) p:5Triage>3Low I agree, but I'm not sure how to close this as a duplicate...in any case, this is pretty low priority for us, because UW is al... [21:28:46] +marktraceur: I don't see where it tells me my error is. [21:29:03] MtDu: What are you talking about? You just gave me the *exact text of the error*. [21:29:32] 6Multimedia, 10Wikimedia-Developer-Summit-2016, 10Wikimedia-Video: WikiDev16: Next generation video for Wikipedia and friends - https://phabricator.wikimedia.org/T112695#1896136 (10MarkTraceur) p:5Triage>3Normal I'm not sure how to deal with this, it's in our workboard as "needs triage", but I don't want... [21:29:47] +marktraceur: I don't see what file the error is in. [21:29:57] MtDu: git grep is your friend. [21:30:23] 6Multimedia, 6Commons, 10MediaWiki-File-management: Instant Commons broken when using thumb.php - https://phabricator.wikimedia.org/T115619#1896139 (10MarkTraceur) p:5Triage>3Low [21:30:23] What's that? [21:30:55] MtDu: If I ever say "try git " and you don't know what that is, go into your terminal and type "git help " [21:31:02] MtDu: So right now, type git help grep [21:31:42] 6Multimedia, 10UploadWizard: Duplicate all the buttons at the top, too - https://phabricator.wikimedia.org/T122074#1896148 (10MarkTraceur) p:5Triage>3Low [21:32:52] 6Multimedia, 10UploadWizard: Add a visible "alert" when uploads are done, even when the user minimized the browser / switched to different tab - https://phabricator.wikimedia.org/T122073#1896153 (10MarkTraceur) p:5Triage>3Low We could try to get permission to show notifications on the desktop, though not a... [21:33:17] MatmaRex: Did the polling patch do anything for performance on your machine? [21:33:33] 6Multimedia, 10UploadWizard, 7Performance: UploadWizard UI performance abysmal when adding many files to upload at once - https://phabricator.wikimedia.org/T121901#1896157 (10MarkTraceur) p:5Triage>3High [21:33:35] tgr: Can you take a look at my patch and see why the qunit tests are failing? [21:33:50] marktraceur: not really [21:33:58] MtDu: Come on, man, you can easily find out where the error is [21:34:14] MtDu: looking [21:34:17] MatmaRex: Shoot. I wonder what the problem is. [21:35:20] tgr: I found some of them and fixed them. I'm stuck on mmv.ui.reuse.Embed: set(), mmv.ui.reuse.Embed: empty(), and mmv.ui.reuse.Embed: attach()/unattach() [21:35:53] 6Multimedia, 6Commons, 10MediaWiki-extensions-GWToolset: GWT - https://phabricator.wikimedia.org/T119053#1896165 (10MarkTraceur) p:5Triage>3Normal [21:36:14] 6Multimedia, 10Wikimedia-Developer-Summit-2016, 10Wikimedia-Video: WikiDev16: Next generation video for Wikipedia and friends [backend] - https://phabricator.wikimedia.org/T118911#1896170 (10MarkTraceur) p:5Triage>3Normal [21:37:26] If you run qunit locally with $wgResourceLoaderDebug = true; you get much more readable stack traces [21:37:29] 6Multimedia, 6Commons, 10MediaWiki-File-management, 7Wikimedia-log-errors: XMPReader::parse exceptions - https://phabricator.wikimedia.org/T118799#1896173 (10MarkTraceur) p:5Triage>3Normal [21:39:55] 6Multimedia, 6Commons, 10MediaWiki-File-management, 10TimedMediaHandler-Transcode, 7Swift: source file is missing, /tmp/localcopy_0fc79bcaac56-1.webm. Encoding failed. - https://phabricator.wikimedia.org/T117771#1896179 (10MarkTraceur) p:5Triage>3Low [21:39:58] MtDu: ^ [21:40:08] Hydronium: I am [21:40:20] k [21:40:33] coolio ༼⌐■ل͟■༽ [21:40:36] 6Multimedia, 6Commons, 10MediaWiki-File-management: Media file metadata should not be parsed - https://phabricator.wikimedia.org/T117130#1896182 (10MarkTraceur) p:5Triage>3Low [21:41:18] MtDu: first of all, the logic in EmbedFileFormatter looks wrong [21:41:24] 6Multimedia, 6Commons, 10MediaWiki-File-management: Media file metadata should be sanitized to be valid UTF-8 before inclusion in page - https://phabricator.wikimedia.org/T117129#1896186 (10MarkTraceur) p:5Triage>3Low [21:41:51] you should add the gender parameter exactly when you use that parameter in the message, ie. when you have a byline [21:42:32] that's not really what your if conditions do though [21:42:44] 6Multimedia, 6Commons, 10MediaWiki-extensions-GWToolset: Could GWToolset upload faster please? - https://phabricator.wikimedia.org/T114099#1896189 (10MarkTraceur) p:5Triage>3Normal [21:43:24] tgr: So how is this wrong? https://dpaste.de/crQx [21:44:11] for example, what happens when you have a source (ie. you have a byline) but you don't have an author? [21:44:19] 6Multimedia, 6Commons, 10MediaWiki-Uploading, 10Wikimedia-Media-storage: 503 errors on API file upload - https://phabricator.wikimedia.org/T113878#1896196 (10MarkTraceur) p:5Triage>3Low Pretty sure this is no longer an issue, but I'll leave this open until someone comes up with an explanation. [21:45:07] gender is unknown. [21:45:42] but it still needs to be added as a parameter [21:46:06] as long as byline is non-empty, creditParams.push should be called with something [21:46:37] tgr: Is this better? https://dpaste.de/gXWW [21:47:37] yes, but you are overcomplicating things [21:48:37] just do if (byline) { if (author and uploader exist and match) { push(gender) } else { push(unknown) } } [21:49:44] so I don't have to check if lastUploader or author are undefined? [21:50:39] So like this? https://dpaste.de/cf7T [21:51:01] you should probably check at least one of them (although currently the last uploader is always defined, but that might not be the case in the future) [21:51:14] but you don't need that many if branches to do that [21:51:53] although the way you did it in that last paste works as well [21:52:32] if lastUploader is undefined then userinfo.gender is 'unknown' anyway [21:52:50] so yeah, that should be fine [21:52:56] tgr: Ok. But what if imageInfo.author doesn't exist? [21:53:00] Won't it throw an error? [21:54:03] tgr: Nvm. I got it. [21:54:23] tgr: So that's one thing fixed. [21:55:22] looks like it will, but you can suppress that with something like htmlToText(info.imageInfo.author || '') [21:55:49] of write if ( author && htmlToText(author) === ... [21:56:34] tgr: I did it the first way. Is that ok? [21:56:57] "I'm starting to believe / in the power of git blame / cause it can't be a mistake / if I just git push change" [21:57:29] it should be, but if it's not, the unit test will catch it anyway [21:57:55] EmbedFileFormatter unit test passes. [21:58:31] Can you take a look at mmv.js tests and see what's wrong? [21:59:37] tgr: It seems like most of them are TypeError: Cannot read property 'gender' of undefined [22:00:37] I think you would have to change less files (and tests) if you added gender to an existing object, instead of trying to pass it as an extra parameter [22:00:50] it makes sense to make it part of ImageInfo anyway [22:01:32] tgr: Where? [22:04:36] hm, on second thought it does not make sense [22:04:43] but it is so much quicker :) [22:05:35] tgr: Ok. So I just leave it as is for now? [22:06:34] in mmv.js in the metadataPromise.done handler, just set imageInfo.gender from userInfo.gender and use that everywhere, and you don't have to unbreak six unrelated unit tests [22:08:10] tgr: So right now, it's this. https://dpaste.de/efmS [22:08:14] 6Multimedia, 6Commons, 10MediaWiki-Change-tagging, 10MediaWiki-Uploading: Allow various uploading tools on Commons to mark their uploads with change tags - https://phabricator.wikimedia.org/T121864#1896272 (10matmarex) a:3matmarex [22:08:15] tgr: What do you want me to change? [22:08:18] 6Multimedia, 10Wikimedia-Developer-Summit-2016, 10Wikimedia-Video: WikiDev16: Next generation video for Wikipedia and friends - https://phabricator.wikimedia.org/T112695#1896273 (10TheDJ) Speaking of.. @Brion we should really have a small talk on how we are gonna structure those 2 sessions. [22:09:29] go back to the last version of the patch that did not add an extra parameter there, and set gender as a userInfo property instead [22:09:58] How do I do that? [22:10:08] tgr: the command please. [22:10:41] you can get the command from the gerrit web interface [22:10:55] hm? [22:11:16] just open the details of the right revision and there will be a git command to copy [22:12:53] Got it. [22:13:01] tgr: Once I do that. What did you say to do? [22:13:12] set gender as a userInfo property? [22:13:40] instead of passing gender as an extra parameter, add it to imageInfo which is already passed to every method you care about [22:14:10] specifically, getCredit* [22:15:07] 6Multimedia, 10MediaWiki-Uploading, 10MediaWiki-extensions-OAuth: OAuth file uploads are not properly tagged - https://phabricator.wikimedia.org/T121875#1896306 (10matmarex) a:3matmarex I think this will be magically fixed by https://gerrit.wikimedia.org/r/#/c/211656/. [22:15:19] 6Multimedia, 10MediaWiki-Uploading, 10MediaWiki-extensions-OAuth: OAuth file uploads are not properly tagged - https://phabricator.wikimedia.org/T121875#1896308 (10matmarex) [22:16:30] tgr: Which file is it in? mmv.provide.ImageInfo.js? [22:17:02] mmv.js [22:18:03] metadataPromise.done is the function that is called when userInfo and imageInfo are loaded, so you can transfer the property there [22:18:41] also, declare the field in mmv.model.ImageInfo so that people are aware it is used [22:18:45] I don't get how to add it to imageInfo. [22:20:27] tgr: so here? https://dpaste.de/bwpd [22:20:41] tgr: And how do I add the gender to imageInfo in the metadataPromise.done [22:21:19] no, don't do that, that'll break a bunch of tests as well [22:21:39] just this.gender = null and no extra argument [22:21:51] it only needs to be there so that people can see it exists [22:22:20] tgr: like this? https://dpaste.de/203q [22:22:29] you can mention in the doc comment where it is really going to be set [22:22:51] like that, but with a doc comment [22:23:34] can I put an oojs.ui date selector on Special:NewFiles ? [22:25:33] tgr: Like htis? https://dpaste.de/HmVB [22:26:32] yes [22:26:45] Hydronium: hey [22:26:53] tgr: Ok. So now how to I add the gender into imageInfo in metadataPromise.done? [22:26:56] o/ hey [22:27:17] MtDu: it's just a property, you can assign a value to it [22:27:18] Working on https://phabricator.wikimedia.org/T13836 [22:28:03] tgr: I don't quite understand. [22:28:34] Hydronium: yeah. i was thinking, it would be neat to rewrite SpecialNewFiles to be a subclass of SpecialNewPages, to resolve https://phabricator.wikimedia.org/T121865 . and then we could do the date thingy for them both at once. [22:28:40] MtDu: imageInfo.gender = userInfo.gender or something like that [22:28:52] ooh, fancy [22:28:55] Hydronium: using the date widget does sounds like a good idea [22:29:08] tgr: Oh. That's what you meant. [22:29:47] tgr: https://dpaste.de/Pq1y? [22:30:57] Hydronium: note that i haven't really looked into this, and i'm not sure if it's actually feasible :D [22:32:02] MtDu: yes, like that [22:32:17] tgr: Ok. Now we fix the qunit errors? [22:33:23] hopefully at this point there are no qunit errors because you did not need to change all the files which were throwing errors in earlier versions [22:33:40] tgr: There are. [22:34:08] tgr: I git fetched patch set 15 [22:34:57] did you succeed in reverting the other files? [22:35:37] you can do "git diff master" to see what files have changed compared to the master version [22:35:51] or "git diff @~", that's a but safer [22:41:57] tgr: Ok. I just reverted everything back. [22:42:31] tgr: Now my changes are gone. Will go back and find them. All I did was change the if statement, add that paramter, and add that statement right? [22:43:02] MtDu: yes [22:43:16] in the future, you can use git stash for this [22:43:51] it saves your changes, you can switch to a different revision and reapply them [22:47:08] tgr: I get these three errors. https://dpaste.de/dTZj [22:47:22] Died on test #1 at http://127.0.0.1:8080/w/load.php?debug=false&lang=en&modules=ext.translate.parsers%7Cext.translate.parsers.test%7Cext.translate.special.pagemigration%7Cext.translate.special.pagemigration.test%7Cext.uls.init%2Cpreferences%2Ctests%7Cext.wikiEditor.toolbar.test%7Cjquery.ajaxdispatcher%2Casync%2CautoEllipsis%2CbyteLength%2CbyteLimit%2CcheckboxShiftClick%2Ccolor%2CcolorUtil%2Ccookie%2Cfullscreen%2CgetAtt [22:47:33] https://dpaste.de/5vZS [22:47:52] https://dpaste.de/KTd2 [22:48:08] https://dpaste.de/nH1Q [22:48:13] After making only those three changes. [22:48:22] I added. imageInfo.gender = userInfo.gender; [22:48:30] /** @property {string} gender The gender of the author */ this.gender = null; [22:48:41] Adn that if ( byline ) { if ( this.htmlUtils.htmlToText( info.imageInfo.author || '' ) === info.imageInfo.lastUploader ) { creditParams.push( info.gender ); } else { creditParams.push( 'unknown' ); } } [22:49:12] tgr:^ [22:49:31] MtDu: probably userInfo is null in some test [22:49:58] you can fix that, or check for it before copying the gender to imageInfo [22:51:23] check for what? And how would I fix it? [22:52:26] Why would you put gender into imageInfo [22:54:18] Is the picture female? [22:54:19] No. [23:15:21] user is in imageinfo, maybe you could name it userGender? [23:34:34] 6Multimedia, 6Commons, 10MediaWiki-Uploading: Commons private-to-public setting - https://phabricator.wikimedia.org/T111792#1896568 (10Tgr) Mainly in that OTRS agents (or whoever does the review) would have to be able to access the stashed file. [23:54:49] MatmaRex: should "New____" be moved to another class so both can extend off of that? [23:54:55] *Special:New____