Steps to replicate the issue (include links if applicable):
- Upload some file
- delete it (normal delete, not revision delete)
- Make sure you have the user rights to do revision deletion - https://www.mediawiki.org/wiki/Manual:RevisionDelete
- go to Special:Undelete
- check the checkbox beside the file revision in the File history section (not the page history)
- Click the button to change visibility of selected revisions
What happens?:
You get an invalid target revision error. The url looks something like ?title=Special:RevisionDelete&type=revision&&target=File%3AMyFilename.png which is incorrect
What should have happened instead?:
You should go to the correct page (with type=filearchive in the url) OR there should be no checkbox and you should only be able to click on the link.
The correct url should look more like: ?title=Special:RevisionDelete&type=filearchive&target=File%3AMyFile.png&ids=11
The code for this primarily lives in includes/specials/SpecialUndelete.php in mediawiki core