Last modified: 2009-11-25 18:03:45 UTC
InstantCommons places all thumbnails into the top-level thumbs directory instead of using hashed paths. The problem seems to be that within ForeignAPIRepo, $this->hashLevels is not initialized. By contrast, it is initialized in the constructor of FSRepo. Possibly ForeignAPIRepo should be derived of FSRepo (not FileRepo), as it does use the file system to store thumbnails? Otherwise, it seems to me that the constructor of ForeignAPIRepo should also initialize $this->hashLevels. Question: would that change need an incremental migration mechanism to move already stored thumbs from the "thumbs" directory to newly correctly hashed paths to avoid re-fetching the thumbs again? Such as "if there's no file at the hash path, look at the non-hashed location, and if there is a matching thumb there, move it over to its hashed location"?
Upon further investigation it looks to me that $this->hashLevels is not initialized because it's not set in Setup.php for the wikimediacommons ForeignAPIRepo. Should it?
Fixed in r59428. Best bet would be to just remove the now-invalid thumbs.