Last modified: 2014-07-15 19:03:10 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()
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.
13'000 Files, for reference: https://commons.wikimedia.org/wiki/User:RLuts/UpWizBug
Change 146482 had a related patch set uploaded by Anomie: RevDelArchivedFileItem needs to override getApiData https://gerrit.wikimedia.org/r/146482
(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.
Change 146482 merged by jenkins-bot: RevDelArchivedFileItem needs to override getApiData https://gerrit.wikimedia.org/r/146482
This should be deployed to WMF wikis with 1.24wmf14, see https://www.mediawiki.org/wiki/MediaWiki_1.24/Roadmap for the schedule.