Last modified: 2009-11-25 18:03:45 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 T23638, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21638 - InstantCommons: ForeignAPIRepo doesn't use hashed path for locally stored thumbnails ($this->hashLevels uninitialized)
InstantCommons: ForeignAPIRepo doesn't use hashed path for locally stored thu...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-25 14:15 UTC by Lupo
Modified: 2009-11-25 18:03 UTC (History)
1 user (show)

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


Attachments

Description Lupo 2009-11-25 14:15:57 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"?
Comment 1 Lupo 2009-11-25 16:32:18 UTC
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?
Comment 2 Chad H. 2009-11-25 18:03:45 UTC
Fixed in r59428. Best bet would be to just remove the now-invalid thumbs.

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


Navigation
Links