Last modified: 2009-08-31 14:33:34 UTC
Since r43795, cleanupImages.php has moved the description pages of any misnamed files along with the files themselves. While implementing this, a check was added to ensure that the script won't try to move files to titles which already have a description page, even if said page is not accompanied by an actual file. On the most recent cleanupImages run on Commons, this resulted in the misnamed, descriptionless file "Picswiss BE-94-01 Kirche von Würzbrunnen (Röthenbach) - "Gotthelf-Kirche&quo.jpg" being moved to the disambiguated title "Picswiss BE-94-01 Kirche von Würzbrunnen (Röthenbach) - "Gotthelf-Kirche&quo 1.jpg" (note the " 1"). The reason the script chose to disambiguate the title was that there already was an existing page at "Picswiss BE-94-01 Kirche von Würzbrunnen (Röthenbach) - "Gotthelf-Kirche&quo.jpg" -- in fact, it was the description page belonging to the original file! The old, pre-r43795 code would've simply reunited the file with its description page, since it didn't pay any attention to the page table at all. Thus, this is arguably a regression. It seems reasonable enough to assume that, if a description page without a file already exists at the corrected title for a file without a description page, they probably belong together. Certainly this would seem extremely unlikely to occur by coincidence. A single case would not merit adding an exception to the code, if it was reasonably likely to be an isolated one. However, this was one case out of the total of nine files moved in that run -- and all the other eight would've been affected by the exact same problem if their description pages hadn't been previously deleted. One actual case and eight narrowly averted ones seems enough to justify a few extra lines of code, particularly since we have no idea how frequent they might be elsewhere. "If it happened once, it will probably some day happen again somewhere." I already committed one fix to this problem as r45388, but it was reverted by brion in r45478. I've written an alternative, possibly cleaner implementation, which I'll attach to this bug as a patch. I'm filing this bug both for discussion of this issue, and so that I'll have a bug number to refer to in comments instead of having to repeat the whole incident report just to explain what these few lines of code are there for.
Created attachment 5648 [details] Patch to cleanupImages.php to modify (and hopefully clarify) the collision detection logic so as to avoid unnecessary title disambiguation
Given the astonishing volume of comments this bug has received, I've gone ahead and applied the patch in r55694.