Last modified: 2013-08-22 14:55:54 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 T44168, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42168 - Fatal error: Call to a member function getDefaultFormat() on a non-object
Fatal error: Call to a member function getDefaultFormat() on a non-object
Status: VERIFIED FIXED
Product: MediaWiki
Classification: Unclassified
ContentHandler (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
: 43549 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-15 22:03 UTC by Sam Reed (reedy)
Modified: 2013-08-22 14:55 UTC (History)
6 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-11-15 22:03:17 UTC
[15-Nov-2012 17:21:39] Fatal error: Call to a member function getDefaultFormat() on a non-object at /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQueryRevisions.php on line 548
Comment 1 Sam Reed (reedy) 2012-11-15 22:03:53 UTC
Server: mw70
Method: GET
URL: http://os.wikipedia.org/w/api.php?action=query&format=php&prop=revisions&titles=1890&rvlimit=1&rvprop=content|timestamp
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQueryRevisions.php(548): ApiQueryRevisions::extractRowInfo()
#1 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQueryRevisions.php(380): ApiQueryRevisions->extractRowInfo(Object(stdClass))
#2 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiQuery.php(327): ApiQueryRevisions->execute()
#3 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiMain.php(820): ApiQuery->execute()
#4 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiMain.php(372): ApiMain->executeAction()
#5 /usr/local/apache/common-local/php-1.21wmf3/includes/api/ApiMain.php(349): ApiMain->executeActionWithErrorHandling()
#6 /usr/local/apache/common-local/php-1.21wmf3/api.php(77): ApiMain->execute()
#7 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#8 {main}
Comment 2 Brad Jorsch 2012-11-16 16:10:50 UTC
The text for revision 107305 on oswiki seems to be missing.

Pre-ContentHandler, the API would get a "false" value back from $revision->getText() in this case, which would be silently cast to an empty string. Now we get back null from $revision->getContent(), and then a PHP fatal error when we try to call its methods.

Gerrit change #33730 takes us back to the old behavior (and the current behavior for the edit form, e.g. http://os.wikipedia.org/w/index.php?oldid=107305&action=edit) of treating this situation as if the revision were empty.
Comment 3 Daniel Kinzler 2012-12-13 16:55:40 UTC
Change Ic41d03fc: (bug 42168) Nicely handle missing revisions in ApiQueryRevisions.
Comment 4 Daniel Kinzler 2012-12-14 09:51:09 UTC
Alternative solution:

Change I5f1eb538: (bug 42168) ApiQueryRevisions shouldn't error on missing content
Comment 5 Brad Jorsch 2012-12-20 15:24:18 UTC
Change Ic41d03fc merged.
Comment 6 Sam Reed (reedy) 2013-01-01 03:11:30 UTC
*** Bug 43549 has been marked as a duplicate of this bug. ***
Comment 7 denny vrandecic 2013-08-22 14:55:54 UTC
Closed older resolved bugs as verified.

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


Navigation
Links