Page MenuHomePhabricator

Upload by URL fails without giving any error
Closed, ResolvedPublic

Description

Whatever file I try to upload via upload_by_url on translatewiki.net, nothing happens: Special:Upload is reloaded as is, no error is shown.
Telling MediaWiki to ignore errors doesn't help and it's the same if there are no local or remote duplicates.
Note that this is different from bug 22015 because no error at all is shown (debug=true didn't help).
It might also be a configuration error.


Version: 1.20.x
Severity: normal
URL: https://gerrit.wikimedia.org/r/gitweb?p=translatewiki.git

Details

Reference
bz39507

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusAssignedTask
OpenNone
Resolvedrohan013

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:59 AM
bzimport set Reference to bz39507.
Nemo_bis created this task.Aug 20 2012, 5:12 PM

Nemo: Is this still an issue?

(In reply to comment #1)

Nemo: Is this still an issue?

Why shouldn't it? It was only 4 months ago. :)
I can no longer test it because TWN doesn't have upload by URL enabled now.

woozle wrote:

I'm having the same problem with MW 1.20.2, and I have only the vaguest clue as to where to start debugging it because apparently the POST data is not handled inside SpecialUpload.php but somewhere else entirely (possibly the SpecialPage class).

Could this be yet another thing related to/fixed by Ia6535f1090627ef2def360bda37c22bff10c7f31 ?
Bug 44135 and bug 42441 all have in common some external request.

woozle wrote:

I'm experiencing this on a site not using https/SSL or Commons, fwiw. (I did have "$wgUseInstantCommons = true;", but after commenting that line out there does not appear to be any change in behavior.)

Tentatively, the problem may be in includes/upload/UploadBase.php or UploadFromURL.php.

woozle wrote:

The problem seems to be that the form shows the necessary controls for uploading by URL even if the user does not have permission to do so, while the code for processing the form fails silently if the user does not have permission (perhaps assuming that the necessary controls would ''not'' display in this case, in which case this condition could only be the result of a deliberate hack).

To reproduce this bug, then, all you have to do is have $wgAllowCopyUploads set TRUE and then attempt an upload while logged in as a user who does not have upload_by_url permission.

Suggested remedy: display a message indicating that the user doesn't have the upload_by_url permission, and link to this page for further explanation: https://www.mediawiki.org/wiki/Manual:$wgAllowCopyUploads

It's possible that this is already fixed in master, then: this would explain why in comment 2 I didn't see it enabled any longer, although I don't recall any related config change.

Duke33 added a comment.May 1 2013, 4:15 PM

I agree with Woozle's comment. At the very least, an error message with some details will help people to determine the issue. When I ran into this issue, I had to research it on mediawiki.org (and of course the documentation was out of date). It required a lot of playing around with various configurations until I got it to work properly.

Brad, thank you. The default config should work for you, did you really have to set upload_by_url to * for it to work? http://tmbw.net/wiki/Special:ListGroupRights

Duke33 added a comment.May 1 2013, 4:47 PM

When I upgraded to 1.20.3, I first added "$wgCopyUploadsFromSpecialUpload = true;" to my LocalSettings.php file. However, when I then tried to enter a source url and upload, the upload form would simply refresh (without any kinds of errors).

I then added "$wgGroupPermissions['*']['upload_by_url'] = true;" to my LocalSettings.php and that fixed it.

(Note - I just re-tested this, by temporarily commenting out the $wgGroupPermissions value, and this is definitely the behaviour on my wiki.)

Removing target milestone that was in the past.

If you want this in a specific release, have a good reason AND you are willing to find resources to fix this bug, feel free to change it to something appropriate.

Change 142000 had a related patch set uploaded by Rohan013:
Disables upload by url option for users without the necessary permissions

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

Change 142000 merged by jenkins-bot:
Disables upload by url option for users without the necessary permissions

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

was successfully merged

Gilles moved this task from Untriaged to Done on the Multimedia board.Dec 4 2014, 10:54 AM