Page MenuHomePhabricator

Title::getTitleValue() fails because ContentHandlerDefaultModelFor() is called for interwiki page.
Closed, ResolvedPublic

Description

In this stacktrace, a Title object is created for "v:", which is an interwiki page. $title->getTitleValue() silently fails (DB key is ""), and returns NULL, causing an error later on.

In reality, ContentHandlerDefaultModelFor( $title, &$modelId ) hook should probably not be called on such title objects.

[2014-06-12 19:45:23] Catchable fatal error: Argument 1 passed to JsonConfig\JCSingleton::getSettings() must be an instance of TitleValue, null given, called in /usr/local/apache/common-local/php-1.24wmf8/extensions/JsonConfig/includes/JCSingleton.php on line 359 and defined at /usr/local/apache/common-local/php-1.24wmf8/extensions/JsonConfig/includes/JCSingleton.php on line 293
Server: mw1184
Method: GET
URL: http://meta.wikimedia.org/wiki/v:
Cookie:
Backtrace:
#0 /usr/local/apache/common-local/php-1.24wmf8/extensions/JsonConfig/includes/JCSingleton.php(293): JsonConfig\JCSingleton::getSettings()
#1 /usr/local/apache/common-local/php-1.24wmf8/extensions/JsonConfig/includes/JCSingleton.php(359): JsonConfig\JCSingleton::getSettings(NULL)
#2 [internal function]: JsonConfig\JCSingleton::onContentHandlerDefaultModelFor(Object(Title), NULL)
#3 /usr/local/apache/common-local/php-1.24wmf8/includes/Hooks.php(206): call_user_func_array('JsonConfig\JCSi...', Array)
#4 /usr/local/apache/common-local/php-1.24wmf8/includes/GlobalFunctions.php(4056): Hooks::run('ContentHandlerD...', Array, NULL)
#5 /usr/local/apache/common-local/php-1.24wmf8/includes/content/ContentHandler.php(204): wfRunHooks('ContentHandlerD...', Array)
#6 /usr/local/apache/common-local/php-1.24wmf8/includes/Title.php(935): ContentHandler::getDefaultModelFor(Object(Title))
#7 /usr/local/apache/common-local/php-1.24wmf8/includes/WikiPage.php(524): Title->getContentModel()
#8 /usr/local/apache/common-local/php-1.24wmf8/includes/WikiPage.php(222): WikiPage->getContentModel()
#9 /usr/local/apache/common-local/php-1.24wmf8/includes/WikiPage.php(208): WikiPage->getContentHandler()
#10 /usr/local/apache/common-local/php-1.24wmf8/includes/actions/Action.php(92): WikiPage->getActionOverrides()
#11 /usr/local/apache/common-local/php-1.24wmf8/includes/actions/Action.php(145): Action::factory('view', Object(WikiPage), Object(RequestContext))
#12 /usr/local/apache/common-local/php-1.24wmf8/includes/Wiki.php(154): Action::getActionName(Object(RequestContext))
#13 /usr/local/apache/common-local/php-1.24wmf8/includes/Wiki.php(527): MediaWiki->getAction()
#14 /usr/local/apache/common-local/php-1.24wmf8/includes/Wiki.php(452): MediaWiki->main()
#15 /usr/local/apache/common-local/php-1.24wmf8/index.php(46): MediaWiki->run()
#16 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#17 {main}


Version: unspecified
Severity: normal

Details

Reference
bz66555

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:24 AM
bzimport set Reference to bz66555.
bzimport added a subscriber: Unknown Object (MLST).
Yurik created this task.Jun 12 2014, 8:30 PM

Change 139203 had a related patch set uploaded by Yurik:
JsonConfig ext update, fixing bug 66555

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

Change 139204 had a related patch set uploaded by Yurik:
JsonConfig ext update, fixing bug 66555

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

Change 139203 merged by jenkins-bot:
JsonConfig ext update, fixing bug 66555

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

Change 139204 merged by jenkins-bot:
JsonConfig ext update, fixing bug 66555

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

Do those merged patches fix the problem, or is more work needed?

Yurik added a comment.Jun 13 2014, 3:26 PM

Those patches are really workaround, the core issue remains.

TTO added a comment.Jul 19 2014, 10:06 AM

Moving to ContentHandler, as that appears to be where the bug lies. If I'm wrong, please don't hesitate to move it back.

Krinkle closed this task as Resolved.Oct 27 2018, 6:30 PM
Krinkle claimed this task.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM