Help:Gadget-Restore-a-lot

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Undeleting some files with Restore-a-lot

Restore-a-lot is a JavaScript gadget that helps with mass restoration (undeletion) of files, only available for admins. The tool is a fork from Cat-a-lot and works in the same way for the most part.

Just like Cat-a-lot, Restore-a-lot will hide in collapsed mode in the bottom right corner of the screen on pages where it could be used. Restore-a-lot can be used on Special:DeletedContributions, undeletion requests and deletion requests.

To activate the gadget, go to "Preferences" : "gadgets" tab, "Tools for authorized users" section: click "Restore-a-lot" and hit "Save" at the bottom of page. Or click here and follow the instructions.

Piped file links like [[:File:Filename|Foo]] will not work with this script. You can, however, unpipe them before using Restore-a-lot. Edit the section in the Requests for undeletion, and look for the magnifying glass in the top right corner of the edit window to open the "search and replace" window. Replace \[\[:File:([^\]]*)\|([^\]]*)\]\] with [[:File:$1]] ($2), tick "Treat search string as a regular expression", press "Replace all" and save the edit.

Debugging

[edit]

If Restore-a-lot seems to malfunction, do the following to obtain useful information. These instructions are for Firefox, but Chrome has similar functionality.

If Restore-a-lot doesn't load at all/can't select any files/hangs, open the Web Developer tools, Console tab (Ctrl+Shift+K), refresh the page and try to undelete something. Copy-paste the output.

If Restore-a-lot would appear to work but doesn't actually undelete files reliably: open the Web Developer tools, network tab (Ctrl+Shift+E) and try to undelete something. You should now see a bunch of "api.php" requests representing the undeletion attempts. Select the api.php for a failed undelete action (this is a bit of trail and error) and go to the "response" tab to look for errors.