Last modified: 2014-05-22 16:21:24 UTC
Suppose a file Old.jpg is uploaded to a wiki; then a second version of the file is uploaded with same name. The first file revision is then deleted. The file is now renamed (moved) to New.jpg: the deleted page history is moved to the new title, but the deleted file itself is not. If I check the page history for Old.jpg, I can see there's a deleted revision and can even undelete it, but then I'll have a file without an associated page (only a 'create' tab is shown, instead of 'edit/delete/history') I made the same test in MW v1.16 and MW v1.19 and both behaved in the same way.
(In reply to comment #0) > I made the same test in MW v1.16 and MW v1.19 and both behaved in the same way. Version -> 1.19.0. 1.16 is unsupported.
I don't know if that's supposed to be a bug. Normal pages have the same behavior, except that when you can't delete a single revision but the entire history (unless a special extension is installed). If you delete a page, then restore some revisions, and then move that page to a new location, only the current revisions are moved. Deleted ones remain at the old title since they are unaffected. The same happens with deleted versions of an image. I agree that when performing page moves, the logs of the page gets fragmented, so log entries performed to the old page aren't "renamed" to the new page. This affects not only deletion logs, but also protection logs and other that may apply (upload logs, for example). Fixing that hay help to track down those deletions. Note that if deleted revisions were renamed with the page, there would be no way to do merges or splits of page histories using this way. I don't know if there's an alternative to this currently.
Jesús, I agree with you that in the case of regular pages it may not be regarded as a bug. That's because a page revision can be considered as an independent entity. But files work differently: each uploaded file *must* be uniquely associated with a page revision, otherwise the referential integrity is broken. In order to keep the database consistency, the deleted page revisions of a file should then not be moved to the new title (similarly to the example you gave of a regular page), retaining the old title together with their associated deleted files.
Changed title to a more descriptive one.