Last modified: 2014-07-03 12:48:53 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 T69422, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67422 - Missing skins/common/images/icons/fileicon.png causes fatal PHP error when viewing file pages for files that can't be thumbnailed
Missing skins/common/images/icons/fileicon.png causes fatal PHP error when vi...
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.23.1
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-02 17:03 UTC by ryan.glasnapp
Modified: 2014-07-03 12:48 UTC (History)
8 users (show)

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


Attachments

Description ryan.glasnapp 2014-07-02 17:03:37 UTC
If certain skin images (such as skins/common/images/icons/fileicon-pdf.png are missing then MediaWiki throws a Fatal PHP error when trying to view the relevant file page.

PHP Fatal error:  Call to a member function toHtml() on a non-object in w/includes/ImagePage.php on line 505
Comment 1 ryan.glasnapp 2014-07-02 17:07:08 UTC
Obviously the fix is to make sure all of the images are there; however, there aren't any useful error messages, or attempts to display a broken image link or something. Just various forms of the "Call to member function X on a non-object. I only found that the icon image was missing on a wild guess.
Comment 2 Bartosz Dziewoński 2014-07-02 17:36:03 UTC
It only files if the file 'fileicon.png' doesn't exist, either. As the code doesn't actually ever read it, it would make sense not to fail like this.
Comment 3 Bartosz Dziewoński 2014-07-02 17:36:30 UTC
(In reply to Bartosz Dziewoński from comment #2)
> It only files

It only *fails*. :)
Comment 4 Gerrit Notification Bot 2014-07-02 17:45:55 UTC
Change 143646 had a related patch set uploaded by Bartosz Dziewoński:
Do not fatal if skins/common/images/icons/fileicon.png doesn't exist

https://gerrit.wikimedia.org/r/143646
Comment 5 Krinkle 2014-07-02 20:26:57 UTC
(In reply to Bartosz Dziewoński from comment #2)
> It only files if the file 'fileicon.png' doesn't exist, either. As the code
> doesn't actually ever read it, it would make sense not to fail like this.

The server may not read the file right then and there, but it sure is used. In this case by the user via the web server directly.

It's still a very valid error. It should be surfaced in a better way though. Perhaps in the mediawiki error log, or by throwing an explicit exception?
Comment 6 Gerrit Notification Bot 2014-07-02 20:29:29 UTC
Change 143646 abandoned by Bartosz Dziewoński:
Do not fatal if skins/common/images/icons/fileicon.png doesn't exist

https://gerrit.wikimedia.org/r/143646

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


Navigation
Links