While attempting to move another file over existent https://commons.wikimedia.org/wiki/File:Denayer.jpg file (requesting deletion of the target file) the target file disappeared and I got a message that move it impossible as the target file is in an inconsistent state. The file seemed to be OK just a while earlier.
How can the file be made in a consistent state again? It is rather important as its EXIF data with connection to the file content are used during copyright resolution process of another file.
Below I describe what exactly did happen step by step.
- While processing this history merge request:
https://commons.wikimedia.org/w/index.php?title=Commons:History_merging_and_splitting/Requests&diff=prev&oldid=191380527
I noticed that the "File:Denayer.jpg" has a single version with EXIF that seems identical to the top (2nd) version of "File:Jason Denayer.jpg" except the latter had no EXIF info and was a bit older. - I decided to merge the top version of "File:Jason Denayer.jpg" as bottom version of "File:Denayer.jpg".
- I reverted the "File:Jason Denayer.jpg" to the 1st version (so now I needed to merge still the 2nd, but not the top one).
- I temporarily deleted the "File:Jason Denayer.jpg"
- I restored only the 2nd version of "File:Jason Denayer.jpg"
- I attempted to rename just restored "File:Jason Denayer.jpg" to new name "File:Denayer.jpg" without creating a redirect
- System reported that "File:Denayer.jpg" already exist and an option to delete this file appeared. I checked this option and requested the rename again
- I got an error messaage that rename failed as the target file is in an inconsistent state. I checked: the "File:Denayer.jpg" was not displayed properly.
- As the file was in use I needed to finish the process quicly, before bots start to unlink the file, so I decided to merge them under another name and fill this bug report.
- I renamed "File:Jason Denayer.jpg" to "File:Denayer2.jpg"
- I restored the remaining versions of "File:Jason Denayer.jpg"
- I renamed "File:Denayer.jpg" to "File:Denayer2.jpg" with redirect and with deletion of the just created target file. The problem described above did not appear here
- I restored the just deleted version of "File:Denayer2.jpg" as the bottom (older) version.
I had performed this process multiple times and I have never encountered the described problem earlier.
I would like to know if there is a mistake in my procedure or is this a software bug. And, if it is the latter case, how the file can be restored to a consistent state?
Links to all files (for convenience):
https://commons.wikimedia.org/wiki/File:Jason_Denayer.jpg
https://commons.wikimedia.org/wiki/File:Denayer2.jpg
https://commons.wikimedia.org/w/index.php?title=File:Denayer.jpg&redirect=no