Page MenuHomePhabricator

Uploading fails where File page exists
Closed, ResolvedPublic

Description

Author: gerard

Description:
If you try to Special:Upload a file to the name of an image where the File: page exists but the image does not, MW correctly mentions this and offers you the chance to upload.

Clicking "Submit modified file description" results in an error.

I received two different errors before and after updating SVN to the latest version.

Using the SVN codebase from a few days ago, this gave the following error:

Fatal error: Call to a member function getId() on a non-object in [path]/includes/upload/UploadFromStash.php on line 32

Using 95194 (current svn), the following error is given:

Warning: preg_match() expects parameter 2 to be string, object given in [path]/includes/upload/UploadStash.php on line 84

Catchable fatal error: Object of class UploadStashFile could not be converted to string in [path]/includes/upload/UploadStash.php on line 85

To clarify:
-This is MW 1.19 SVN, up to date
-Uploading works fine, permissions/chmod are fine
-Image does not exist, but the File: page does
-In my scenario, we Special:Imported some pages which included File: pages, and are retrospectively uploading the images through Special:Upload


Version: 1.20.x
Severity: normal

Details

Reference
bz30505

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 11:49 PM
bzimport set Reference to bz30505.

Bryan.TongMinh wrote:

*** Bug 30562 has been marked as a duplicate of this bug. ***

Bryan.TongMinh wrote:

I think this should be assigned to Ian or Neil; either one touched that code the latest.

ibaker wrote:

Thanks for catching this. Should be fixed in r95581, and deployed soon. Thanks also to Bawolff for the stack trace. That was invaluable since I was having trouble duplicating it locally.