Last modified: 2009-08-31 14:33:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18916, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16916 - Unnecessary title disambiguation by cleanupImages.php
Unnecessary title disambiguation by cleanupImages.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.14.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://commons.wikimedia.org/wiki/Fil...
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-07 04:00 UTC by Ilmari Karonen
Modified: 2009-08-31 14:33 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to cleanupImages.php to modify (and hopefully clarify) the collision detection logic so as to avoid unnecessary title disambiguation (1.66 KB, patch)
2009-01-07 04:03 UTC, Ilmari Karonen
Details

Description Ilmari Karonen 2009-01-07 04:00:40 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.
Comment 1 Ilmari Karonen 2009-01-07 04:03:32 UTC
Created attachment 5648 [details]
Patch to cleanupImages.php to modify (and hopefully clarify) the collision detection logic so as to avoid unnecessary title disambiguation
Comment 2 Ilmari Karonen 2009-08-31 14:33:34 UTC
Given the astonishing volume of comments this bug has received, I've gone ahead and applied the patch in r55694.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links