Last modified: 2013-05-06 01:07:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49771, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47771 - UploadWizard doesn't transfer Flickr photos
UploadWizard doesn't transfer Flickr photos
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nischay Nahata
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-27 11:30 UTC by Robert Myers
Modified: 2013-05-06 01:07 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Example of a "blank file" (21.03 KB, image/png)
2013-04-27 11:30 UTC, Robert Myers
Details

Description Robert Myers 2013-04-27 11:30:49 UTC
Created attachment 12188 [details]
Example of a "blank file"

I've tried transferring photographs licensed under CC-BY/CC-BY-SA 2.0 from Flickr authors whom are not blacklisted. This happens on all browsers and on Mac OS X and Windows 7 OS. 

http://commons.wikimedia.org/wiki/Commons:Upload_Wizard_feedback#Upload_Wizard_does_nothing_with_Flickr_uploads
Comment 1 Alex Monk 2013-04-27 20:47:15 UTC
So after getting through to the flickr interface on that wiki using $( '#mwe-upwiz-upload-ctrl-flickr' ).click() and uploading a file, I see this error:


Uncaught TypeError: Object function arrayPrototypeUniq() {
	var result = [];
	for( var i = 0; i < this.length; ++i ) {
		var current = this[i];
		if( result.indexOf( current ) == -1 ) {
			result.push( current );
		}
	}
	return result;
} has no method 'counter' 



This is because we loop through an array in updateCopyMsgs in mw.UploadWizardDetails.js using "for ( var mx in msgs ) { var msg = msgs[mx]; }".

For most users this is fine, but both of us include Array.prototype.uniq, Array.prototype.dups, and Array.prototype.chunk in morebits.js, which is needed for Twinkle.

(I'm using https://en.wikipedia.org/w/index.php?title=User:AzaToth/morebits.js while the bug creator seems to be using https://commons.wikimedia.org/wiki/User:Maximr/morebits.js)

I'm not sure we should expect other JS to do this, but a workaround seems to be to use $.each on the msgs array instead.
Comment 2 Gerrit Notification Bot 2013-04-28 05:53:13 UTC
Related URL: https://gerrit.wikimedia.org/r/61249 (Gerrit Change I583dbb8e196b7b87137ac9de2c4747d1e99405fc)
Comment 3 Nischay Nahata 2013-04-28 05:56:09 UTC
Alex, I have just changed the for loop to $.each can you verify that this works.
Comment 4 Alex Monk 2013-04-28 13:41:43 UTC
(In reply to comment #3)
> Alex, I have just changed the for loop to $.each can you verify that this
> works.

This needs to be answered first:

> I'm not sure we should expect other JS to do this

I cannot verify that this entirely fixes the problem, we'll have to ask the bug creator about that.
Comment 5 Alex Monk 2013-04-28 15:19:45 UTC
... Okay, TheDJ has approved the change. This should get deployed to Commons on Wednesday the 1st of May. Hopefully we'll know whether this completely fixed it for the bug creator then.
Comment 6 Nischay Nahata 2013-04-28 15:23:38 UTC
(In reply to comment #5)

I now think the change shouldn't have been merged in, see my inline comments on the patch.
Comment 7 Robert Myers 2013-05-06 01:07:21 UTC
I can confirm that the change made has fixed the issue.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links