Last modified: 2013-04-22 16:16:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 41128 - Call to a member function getModel() on a non-object
Call to a member function getModel() on a non-object
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ContentHandler (Other open bugs)
unspecified
All All
: Highest major (vote)
: ---
Assigned To: Daniel Kinzler
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-17 19:31 UTC by Sam Reed (reedy)
Modified: 2013-04-22 16:16 UTC (History)
3 users (show)

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


Attachments

Comment 1 Sam Reed (reedy) 2012-10-17 19:35:41 UTC
[17-Oct-2012 18:47:55] Fatal error: Call to a member function getModel() on a
non-object at
/usr/local/apache/common-local/php-1.21wmf2/includes/actions/RawAction.php on
line 155
Server: srv213
Method: GET
URL:
http://commons.wikimedia.org/w/index.php?title=File:Ward_Cunningham_-_Commons-1.jpg&action=raw&ctype=text/css&oldid=69956248&maxage=0&smaxage=0
Backtrace:
#0
/usr/local/apache/common-local/php-1.21wmf2/includes/actions/RawAction.php(155):
RawAction::getRawText()
#1
/usr/local/apache/common-local/php-1.21wmf2/includes/actions/RawAction.php(99):
RawAction->getRawText()
#2 /usr/local/apache/common-local/php-1.21wmf2/includes/Action.php(541):
RawAction->onView()
#3 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(428):
FormlessAction->show()
#4 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(305):
MediaWiki->performAction(Object(ImagePage))
#5 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(554):
MediaWiki->performRequest()
#6 /usr/local/apache/common-local/php-1.21wmf2/includes/Wiki.php(447):
MediaWiki->main()
#7 /usr/local/apache/common-local/php-1.21wmf2/index.php(59): MediaWiki->run()
#8 /usr/local/apache/common-local/live-1.5/index.php(3):
require('/usr/local/apac...')
#9 {main}
Comment 2 Sam Reed (reedy) 2012-10-17 21:59:28 UTC
				if ( !$content instanceof TextContent ) {
					wfHttpError( 415, "Unsupported Media Type", "The requested page uses the content model `"
										. $content->getModel() . "` which is not supported via this interface." );
					die();
				}

We're already in an error block at this point.

revision->getContent() can return Content or null, but is only documented as returning Content.

I'm highly suspecting it's getting null.


Moved to ContentHandler
Comment 3 Sam Reed (reedy) 2012-10-17 22:06:17 UTC
(In reply to comment #2)
> revision->getContent() can return Content or null, but is only documented as
> returning Content.

https://gerrit.wikimedia.org/r/28454 fixes up the docs
Comment 4 Daniel Kinzler 2012-10-18 09:06:06 UTC
revision->getContent() can return null if a revision was deleted (or was lost). I'll look at it.
Comment 5 Daniel Kinzler 2012-10-18 11:03:41 UTC
ctype=text/css? that request seems pretty broken...

Anyway. Fix submitted to git: Iac856075
Comment 6 Sam Reed (reedy) 2012-10-18 14:17:11 UTC
Merged

1.21wmf2 is https://gerrit.wikimedia.org/r/28513

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


Navigation
Links