Page MenuHomePhabricator

Unknown warning: "duplicateversions" when trying to upload a file with UploadWizard that already exists as an old revision; no warning with Special:Upload
Closed, ResolvedPublic

Description

When I tried to upload the first revision of https://commons.wikimedia.org/wiki/File:Terence_Winter.jpg with UploadWizard, I got the error it's a duplicate of that file (well doh) and another file with an unknown filename.

So I cropped https://commons.wikimedia.org/wiki/File:Terence_Winter.jpg a bit, now that's no longer a duplicate. Now UploadWizard just gives this error: Unknown warning: "duplicateversions". I can't upload it.

When using Special:Upload instead, the file is uploaded without any error.

Update: note that now UploadWizard will say "A file identical to this file (File:Test winter.jpg) has previously been deleted.", this was my Special:Upload test. Click "Upload anyway" and you will see Unknown warning: "duplicateversions". This error is not caused by Test winter.jpg.

Suggested solution: UploadWizard should report the file already exists as an old revision of $filename, or (if deleted) produce the same warning as that for deleted files. ("A file identical to this file (File:El pikashu ma chido.png) has previously been deleted. You should check that file's deletion history. If you disagree with the reason for deletion, please make an undeletion request instead of re-uploading.")

Special:Upload could also warn the user.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Terence Winter.jpg (651×470 px, 71 KB)

The file in question. (unknown if copyvio or not, do not use for purposes other than testing)

Aklapper renamed this task from Unknown warning: "duplicateversions". error when uploading Terence Winter.jpg to Unknown warning: "duplicateversions" when uploading Terence Winter.jpg to Commons; no problem with Special:Upload.Jun 15 2019, 10:36 PM
AlexisJazz renamed this task from Unknown warning: "duplicateversions" when uploading Terence Winter.jpg to Commons; no problem with Special:Upload to Unknown warning: "duplicateversions" when trying to upload a file with UploadWizard that already exists as an old revision; no problem with Special:Upload.Jul 1 2019, 7:57 AM

@Aklapper I changed the title again because it turns out to be a general issue.

AlexisJazz renamed this task from Unknown warning: "duplicateversions" when trying to upload a file with UploadWizard that already exists as an old revision; no problem with Special:Upload to Unknown warning: "duplicateversions" when trying to upload a file with UploadWizard that already exists as an old revision; no warning with Special:Upload.Jul 1 2019, 8:06 AM

When uploading the first revision of https://commons.wikimedia.org/wiki/File:Stek5.jpg (not deleted, just overwritten), I now get no error.

When uploading the first revision of https://commons.wikimedia.org/wiki/File:Sakuragicho_Station_Name_Board_Pikachu.jpg (revision deleted), I get Unknown warning: "duplicateversions".

Sakuragicho Station Name Board Pikachu.jpg (3×4 px, 2 MB)
First revision of the file attached for testing. Pikachu owns the copyright to Super Mario, etc

In my testing this happens whether or not the file revision is deleted, but the local file name has to be the same as the current name of the existing file on the wiki.

Change 962702 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/UploadWizard@master] Add handling of 'duplicateversions' warning

https://gerrit.wikimedia.org/r/962702

Change 962702 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Add handling of 'duplicateversions' warning

https://gerrit.wikimedia.org/r/962702