Last modified: 2009-11-28 04:43:44 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 T19835, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17835 - ForeignAPIRepo throwing error on first page load for file
ForeignAPIRepo throwing error on first page load for file
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.15.x
All All
: Normal minor (vote)
: ---
Assigned To: Chad H.
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-07 08:33 UTC by OverlordQ
Modified: 2009-11-28 04:43 UTC (History)
1 user (show)

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


Attachments

Description OverlordQ 2009-03-07 08:33:47 UTC
The first time somebody loads a page of a file from a ForeignAPIRepo (eg: commons) you get a PHP error:

Warning: file_put_contents(/var/www/host/wiki/images/thumb/BackUpAndPush.ogg/) function.file-put-contents: failed to open stream: Is a directory in /var/www/host/wiki/includes/filerepo/ForeignAPIRepo.php on line 172
Comment 1 OverlordQ 2009-03-15 14:02:10 UTC
I noticed this occurs only with files other then images, such as audio/video since these wont have thumbnails.

Browsing through the code it doesn't seem to take into account cases like this.
Comment 2 Chad H. 2009-03-16 19:08:59 UTC
Odd. I can't seem to replicate this locally. What configuration do you have for $wgForeignFileRepos? Do you have any extensions related to Ogg like OggHandler?
Comment 3 OverlordQ 2009-03-16 19:12:51 UTC
It's the example Commons config:

==
$wgForeignFileRepos[] = array(
   'class'                   => 'ForeignAPIRepo',
   'name'                    => 'shared',
   'apibase'                 => 'http://commons.wikimedia.org/w/api.php',
   'fetchDescription'        => true, // Optional
   'descriptionCacheExpiry'  => 43200, // 12 hours, optional
   'apiThumbCacheExpiry'     => 43200, // 12 hours, optional, but required for local thumb caching
);
==

And yea, good eye, doesn't seem to trigger if OggPlayer is disabled. Didn't think about that.
Comment 4 Chad H. 2009-04-10 21:24:44 UTC
Fixed in r49381

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


Navigation
Links