Last modified: 2014-07-15 19:03:10 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 T70034, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68034 - Call to undefined method ArchivedFile::getArchiveName() when attempting to restore file revision
Call to undefined method ArchivedFile::getArchiveName() when attempting to re...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-15 14:27 UTC by Rainer Rillke @commons.wikimedia
Modified: 2014-07-15 19:03 UTC (History)
5 users (show)

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


Attachments

Description Rainer Rillke @commons.wikimedia 2014-07-15 14:27:08 UTC
Original bug title:
Call to undefined method ArchivedFile::getArchiveName() when attempting to restore file revision

Query:
POST https://commons.wikimedia.org/w/api.php
action	revisiondelete
format	jsonfm
ids	2373038
reason	test
show	content|comment|user
target	File:' onmouseover='alert("There is a security vulnerable. Please contact the next admin if you see this in a message box.")' target='.png
token	<redacted>
type	filearchive

Result:
500 Internal Server Error

Wikimedia Foundation
Error

PHP fatal error in /usr/local/apache/common-local/php-1.24wmf12/includes/revisiondelete/RevisionDelete.php line 748:
Call to undefined method ArchivedFile::getArchiveName()
Comment 1 Rainer Rillke @commons.wikimedia 2014-07-15 14:44:51 UTC
It's possible that I do something wrong but it should still not return a server error. Also it's quite unintuitive that action=delete deletes all revisions but action=undelete with timestamps provided only restores text revisions.

This is currently blocking writing a semi-automated revision splitting script to clean up the mess UploadWizard (Bug 40304, Bug 54750) created.
Comment 2 Rainer Rillke @commons.wikimedia 2014-07-15 14:46:03 UTC
13'000 Files, for reference: https://commons.wikimedia.org/wiki/User:RLuts/UpWizBug
Comment 3 Gerrit Notification Bot 2014-07-15 16:00:31 UTC
Change 146482 had a related patch set uploaded by Anomie:
RevDelArchivedFileItem needs to override getApiData

https://gerrit.wikimedia.org/r/146482
Comment 4 Brad Jorsch 2014-07-15 16:05:52 UTC
(In reply to Rainer Rillke @commons.wikimedia from comment #1)
> Also it's quite unintuitive that action=delete deletes all
> revisions but action=undelete with timestamps provided only restores text
> revisions.

That makes sense to me, since it parallels action=delete and Special:Undelete in the web UI.

The real problem is bug 40817: there's no way to undelete files at all.
Comment 5 Gerrit Notification Bot 2014-07-15 18:54:41 UTC
Change 146482 merged by jenkins-bot:
RevDelArchivedFileItem needs to override getApiData

https://gerrit.wikimedia.org/r/146482
Comment 6 Brad Jorsch 2014-07-15 19:03:10 UTC
This should be deployed to WMF wikis with 1.24wmf14, see https://www.mediawiki.org/wiki/MediaWiki_1.24/Roadmap for the schedule.

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


Navigation
Links