Last modified: 2014-06-08 21:47:09 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 T54978, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52978 - Setting $wgCopyUploadsFromSpecialUpload = true does not trigger duplicate filename detection
Setting $wgCopyUploadsFromSpecialUpload = true does not trigger duplicate fil...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Mark Holmquist
:
: 53859 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-18 03:24 UTC by zoglun
Modified: 2014-06-08 21:47 UTC (History)
7 users (show)

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


Attachments
Screenshot (73.15 KB, image/png)
2013-08-19 23:19 UTC, Andre Klapper
Details

Description zoglun 2013-08-18 03:24:38 UTC
I don't know why people add a new "$wgCopyUploadsFromSpecialUpload" since 1.20.0.

But it creat bug in my wiki(1.22wmf9 (0727d6a))

I use to use 
$wgGroupPermissions['autoconfirmed']['upload_by_url'] = true;
$wgAllowCopyUploads = true;
everything works fine.

After 1.20 the URL upload bar despaired and then I realized new configuration is :

$wgGroupPermissions['autoconfirmed']['upload_by_url'] = true;
$wgAllowCopyUploads = true;
$wgCopyUploadsFromSpecialUpload = true;
From http://www.mediawiki.org/wiki/Manual:$wgCopyUploadsFromSpecialUpload

However, when $wgCopyUploadsFromSpecialUpload = true; the system can't detect duplicate image and can't copy file name too.



Here is a screenshot when $wgCopyUploadsFromSpecialUpload set to false: http://i.imgur.com/JVImbF2.jpg

Here is another screenshot when $wgCopyUploadsFromSpecialUpload set to true, which is abnormal: http://i.imgur.com/3oBwXfd.jpg

And this is a link for testment: http://en.moegirl.org/Special:Upload
Comment 1 Andre Klapper 2013-08-19 09:40:03 UTC
(In reply to comment #0)
> I don't know why people add a new "$wgCopyUploadsFromSpecialUpload" since
> 1.20.0.

Description says "to enable uploading from URLs". :)

> And this is a link for testment: http://en.moegirl.org/Special:Upload

I logged in with test1 and test1234 and used the example filename from your screenshots when going to Special:Upload. I get
"A file with this name exists already, please check File:Img illust miku.png if you are not sure if you want to change it."
So either you've set the value to False, or I cannot reproduce the problem.
Comment 2 zoglun 2013-08-19 19:34:01 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > I don't know why people add a new "$wgCopyUploadsFromSpecialUpload" since
> > 1.20.0.
> 
> Description says "to enable uploading from URLs". :)
> 
> > And this is a link for testment: http://en.moegirl.org/Special:Upload
> 
> I logged in with test1 and test1234 and used the example filename from your
> screenshots when going to Special:Upload. I get
> "A file with this name exists already, please check File:Img illust miku.png
> if
> you are not sure if you want to change it."
> So either you've set the value to False, or I cannot reproduce the problem.

I tried the account test1 but the system reply "There is no user by the name "test1"."

In order to make sure this is not a browser problem, I registered a new account "testerforurlupload" with password "123456".

Using this account to test, neither IE10, chrome 28 nor firefox 23 can generate the file name.


BTW, I find a new bug, when using Source URL, the Destination filename will be filled by Url not real file name.

Screenshot: http://i.imgur.com/QgypTnc.jpg
Comment 3 Andre Klapper 2013-08-19 23:19:33 UTC
Created attachment 13131 [details]
Screenshot

Sorry for the confusion with the account.

(In reply to comment #2)
> In order to make sure this is not a browser problem, I registered a new
> account "testerforurlupload" with password "123456".

I used that account, chose a random PNG file to upload, set the name to Img_illust_muiku.png, and it works for me as the existing file is detected.
Comment 4 zoglun 2013-08-20 02:42:14 UTC
That is quite strange, May I know which kind of browser you are using?
Comment 5 Andre Klapper 2013-08-20 08:20:01 UTC
Firefox 23 on Fedora 19.
Comment 6 Andre Klapper 2013-09-09 23:33:33 UTC
*** Bug 53859 has been marked as a duplicate of this bug. ***
Comment 7 Andre Klapper 2013-09-09 23:36:06 UTC
My guts tell me that bug 39507 might have the same underlying reason, plus we have dup bug 53859 now so there is definitely some issue here to sort out though conditions to reproduce are not totally clear yet.

Worth investigating by the Multimedia team.
Comment 8 Steve 2013-09-10 19:09:29 UTC
Conditions to reproduce. Set these in LocalSettings:

$wgAllowCopyUploads = true;
$wgCopyUploadsFromSpecialUpload = true;
$wgGroupPermissions['user']['upload_by_url'] = true;

Then login, go to the upload form, and Browse for a file. When you select the file, Destination filename is not filled-in and the thumbnail doesn't appear. No duplicate filename detection.
Comment 9 Steve 2013-09-10 19:39:46 UTC
I found the line of code which changed from 1.20 to 1.21 that broke it:

/includes/specials/SpecialUpload.php

	line 1116: $id = $this->mParams['id'];

Change to what it was in 1.20 and Special:Upload works again with copy uploads:

	line 1116: $id = "wpSourceType{$this->mParams['upload-type']}";
Comment 10 Andre Klapper 2013-09-17 12:52:41 UTC
mtraceur: Could you take a look at this?
Comment 11 tobias.brink 2013-12-22 17:24:28 UTC
For what it's worth I have the same problem and I can confirm that Steve's solution fixes it. I also tested disabling copy uploads and everything still works.
Comment 12 tobias.brink 2014-06-08 20:46:55 UTC
This bug is fixed for me with version 1.23. Thanks.
Comment 13 Bawolff (Brian Wolff) 2014-06-08 21:47:09 UTC
Also works for me on master. Closing as fixed

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


Navigation
Links