Last modified: 2013-06-24 19:04:17 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 T51897, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49897 - Fatal error: Call to a member function getCode() on a non-object
Fatal error: Call to a member function getCode() on a non-object
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ProofreadPage (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 18:06 UTC by Sam Reed (reedy)
Modified: 2013-06-24 19:04 UTC (History)
5 users (show)

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


Attachments

Description Sam Reed (reedy) 2013-06-20 18:06:33 UTC
[20-Jun-2013 18:04:58] Fatal error: Call to a member function getCode() on a non-object at /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php on line 1288
Server: mw1007
URL: http://[unknown-host]
Backtrace:
#0 /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php(1288): wfGetLangObj()
#1 /usr/local/apache/common-local/php-1.22wmf8/includes/cache/MessageCache.php(728): wfGetLangObj(NULL)
#2 /usr/local/apache/common-local/php-1.22wmf8/includes/Message.php(720): MessageCache->get('proofreadpage_n...', true, NULL)
#3 /usr/local/apache/common-local/php-1.22wmf8/includes/Message.php(464): Message->fetchMessage()
#4 /usr/local/apache/common-local/php-1.22wmf8/includes/Message.php(563): Message->toString()
#5 /usr/local/apache/common-local/php-1.22wmf8/extensions/ProofreadPage/includes/ProofreadPageInit.php(140): Message->plain()
#6 /usr/local/apache/common-local/php-1.22wmf8/extensions/ProofreadPage/ProofreadPage.body.php(37): ProofreadPageInit::getNamespaceId('page', 'proofreadpage_n...')
#7 /usr/local/apache/common-local/php-1.22wmf8/extensions/ProofreadPage/ProofreadPage.body.php(1612): ProofreadPage::getPageNamespaceId()
#8 [internal function]: ProofreadPage::addCanonicalNamespaces(Array)
#9 /usr/local/apache/common-local/php-1.22wmf8/includes/Hooks.php(196): call_user_func_array('ProofreadPage::...', Array)
#10 /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php(3834): Hooks::run('CanonicalNamesp...', Array)
#11 /usr/local/apache/common-local/php-1.22wmf8/includes/Namespace.php(226): wfRunHooks('CanonicalNamesp...', Array)
#12 /usr/local/apache/common-local/php-1.22wmf8/includes/Namespace.php(277): MWNamespace::getCanonicalNamespaces()
#13 /usr/local/apache/common-local/php-1.22wmf8/includes/Namespace.php(367): MWNamespace::getValidNamespaces()
#14 /usr/local/apache/common-local/wmf-config/CommonSettings.php(2515): MWNamespace::getTalkNamespaces()
#15 [internal function]: wmfWBClientExcludeNS()
#16 /usr/local/apache/common-local/php-1.22wmf8/includes/Hooks.php(196): call_user_func_array('wmfWBClientExcl...', Array)
#17 /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php(3834): Hooks::run('SetupAfterCache', Array)
#18 /usr/local/apache/common-local/php-1.22wmf8/includes/Setup.php(497): wfRunHooks('SetupAfterCache')
#19 /usr/local/apache/common-local/php-1.22wmf8/maintenance/doMaintenance.php(107): require_once('/usr/local/apac...')
#20 /usr/local/apache/common-local/php-1.22wmf8/maintenance/runJobs.php(153): require_once('/usr/local/apac...')
#21 /usr/local/apache/common-local/multiversion/MWScript.php(97): require_once('/usr/local/apac...')
Comment 1 Sam Reed (reedy) 2013-06-20 18:24:57 UTC
[20-Jun-2013 18:18:10] Fatal error: Call to a member function getCode() on a non-object at /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php on line 1288
Server: mw1186
Method: GET
URL: http://test2.wikipedia.org/
Backtrace:
#0 /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php(1288): wfGetLangObj()
#1 /usr/local/apache/common-local/php-1.22wmf8/includes/cache/MessageCache.php(728): wfGetLangObj(NULL)
#2 /usr/local/apache/common-local/php-1.22wmf8/includes/Message.php(720): MessageCache->get('proofreadpage_n...', true, NULL)
#3 /usr/local/apache/common-local/php-1.22wmf8/includes/Message.php(464): Message->fetchMessage()
#4 /usr/local/apache/common-local/php-1.22wmf8/includes/Message.php(563): Message->toString()
#5 /usr/local/apache/common-local/php-1.22wmf8/extensions/ProofreadPage/includes/ProofreadPageInit.php(140): Message->plain()
#6 /usr/local/apache/common-local/php-1.22wmf8/extensions/ProofreadPage/ProofreadPage.body.php(37): ProofreadPageInit::getNamespaceId('page', 'proofreadpage_n...')
#7 /usr/local/apache/common-local/php-1.22wmf8/extensions/ProofreadPage/ProofreadPage.body.php(1612): ProofreadPage::getPageNamespaceId()
#8 [internal function]: ProofreadPage::addCanonicalNamespaces(Array)
#9 /usr/local/apache/common-local/php-1.22wmf8/includes/Hooks.php(196): call_user_func_array('ProofreadPage::...', Array)
#10 /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php(3834): Hooks::run('CanonicalNamesp...', Array)
#11 /usr/local/apache/common-local/php-1.22wmf8/includes/Namespace.php(226): wfRunHooks('CanonicalNamesp...', Array)
#12 /usr/local/apache/common-local/php-1.22wmf8/includes/Namespace.php(277): MWNamespace::getCanonicalNamespaces()
#13 /usr/local/apache/common-local/php-1.22wmf8/includes/Namespace.php(367): MWNamespace::getValidNamespaces()
#14 /usr/local/apache/common-local/wmf-config/CommonSettings.php(2515): MWNamespace::getTalkNamespaces()
#15 [internal function]: wmfWBClientExcludeNS()
#16 /usr/local/apache/common-local/php-1.22wmf8/includes/Hooks.php(196): call_user_func_array('wmfWBClientExcl...', Array)
#17 /usr/local/apache/common-local/php-1.22wmf8/includes/GlobalFunctions.php(3834): Hooks::run('SetupAfterCache', Array)
#18 /usr/local/apache/common-local/php-1.22wmf8/includes/Setup.php(497): wfRunHooks('SetupAfterCache')
#19 /usr/local/apache/common-local/php-1.22wmf8/includes/WebStart.php(156): require_once('/usr/local/apac...')
Comment 2 Niklas Laxström 2013-06-20 18:37:16 UTC
So this call wfMessage in middle of the setup procedure. Hook is called on line 497, while $wgContLang is only set up on line 518.
Comment 3 Tpt 2013-06-20 18:56:36 UTC
The bug is caused by change Ie0800246e7b995ec4f3e9d19b0f6705fb72afa1c that introduce a call of the initialization of the page and index namespaces ids in the ProofreadPage:addCanonicalNamespaces method that is called by a hook called itself by SetupAfterCache. So the initialization of the ids are now done at this step and not after. A strange thing is that my test wiki is not affected.
Comment 4 Niklas Laxström 2013-06-20 19:00:16 UTC
From IRC: perhaps a workaround would be to use $wgLanguageCode instead of $wgContLang, or setup $wgContLang earlier. But I'd like code not to call wfMessage that early
Comment 5 Tpt 2013-06-20 19:11:08 UTC
The major issue here is that namespaces used by ProofreadPage were configured using messages: to say to the extension to use as page namespaces the namespace "Page" people adds "Page" in the proofreadpage_namespace message. I have created last year a configuration variable $wgProofreadPageNamespaceIds that allows to set these namespaces in the site configuration. All Wikimedia site have been moved to the new system. I think that we can now remove the support of this legacy feature. So, I'll make a patch to remove calls to mwMessage and an other to migrate remaining wikis (test2 and maybe one or two others).
Comment 6 Gerrit Notification Bot 2013-06-20 19:15:05 UTC
Related URL: https://gerrit.wikimedia.org/r/69754 (Gerrit Change I0037f74ea3a0624d90508ba0c271445231807b11)
Comment 7 Gerrit Notification Bot 2013-06-20 19:17:00 UTC
Related URL: https://gerrit.wikimedia.org/r/69755 (Gerrit Change I6bdb111ca6a83773a65aa9f06c7f5d0126f4f9db)
Comment 8 Gerrit Notification Bot 2013-06-20 19:22:02 UTC
https://gerrit.wikimedia.org/r/69755 (Gerrit Change I6bdb111ca6a83773a65aa9f06c7f5d0126f4f9db) | change APPROVED and MERGED [by jenkins-bot]
Comment 9 Gerrit Notification Bot 2013-06-20 20:21:06 UTC
https://gerrit.wikimedia.org/r/69754 (Gerrit Change I0037f74ea3a0624d90508ba0c271445231807b11) | change APPROVED and MERGED [by Reedy]
Comment 10 Tpt 2013-06-24 19:04:17 UTC
The issue have been fixed. test2 is working fine now.

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


Navigation
Links