Page MenuHomePhabricator

MobileFrontendSkinHooks::getPluralLicenseInfo() unstubs $wgUser during ResourceLoaderGetConfigVars hook
Closed, ResolvedPublic

Description

From local dev instance where I'm trying out disabling sessions for load.php requests:

12016-02-23 20:43:16 wiki exception ERROR: [c1dae4f1] /w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector BadMethodCallException from line 960 of /vagrant/mediawiki/includes/session/SessionManager.php: Sessions are disabled for this entry point {"exception_id":"c1dae4f1"}
2[Exception BadMethodCallException] (/vagrant/mediawiki/includes/session/SessionManager.php:960) Sessions are disabled for this entry point
3 #0 /vagrant/mediawiki/includes/session/SessionManager.php(187): MediaWiki\Session\SessionManager->getSessionFromInfo(MediaWiki\Session\SessionInfo, WebRequest)
4 #1 /vagrant/mediawiki/includes/WebRequest.php(664): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
5 #2 /vagrant/mediawiki/includes/user/User.php(1175): WebRequest->getSession()
6 #3 /vagrant/mediawiki/includes/user/User.php(384): User->loadFromSession()
7 #4 /vagrant/mediawiki/includes/user/User.php(5093): User->load()
8 #5 /vagrant/mediawiki/includes/user/User.php(2706): User->loadOptions()
9 #6 /vagrant/mediawiki/includes/context/RequestContext.php(368): User->getOption(string)
10 #7 /vagrant/mediawiki/includes/StubObject.php(204): RequestContext->getLanguage()
11 #8 /vagrant/mediawiki/includes/StubObject.php(160): StubUserLang->_newObject()
12 #9 /vagrant/mediawiki/includes/StubObject.php(104): StubObject->_unstub(string, integer)
13 #10 /vagrant/mediawiki/includes/StubObject.php(179): StubObject->_call(string, array)
14 #11 /vagrant/mediawiki/includes/cache/MessageCache.php(824): StubUserLang->__call(string, array)
15 #12 /vagrant/mediawiki/includes/cache/MessageCache.php(767): MessageCache->getMessageFromFallbackChain(StubUserLang, string, boolean)
16 #13 /vagrant/mediawiki/includes/Message.php(1148): MessageCache->get(string, boolean, StubUserLang)
17 #14 /vagrant/mediawiki/includes/Message.php(934): Message->fetchMessage()
18 #15 /vagrant/mediawiki/extensions/MobileFrontend/includes/MobileFrontend.skin.hooks.php(47): Message->isDisabled()
19 #16 /vagrant/mediawiki/extensions/MobileFrontend/includes/MobileFrontend.skin.hooks.php(105): MobileFrontendSkinHooks::getPluralLicenseInfo(string)
20 #17 /vagrant/mediawiki/extensions/MobileFrontend/includes/MobileFrontend.hooks.php(436): MobileFrontendSkinHooks::getLicense(string)
21 #18 /vagrant/mediawiki/includes/Hooks.php(195): MobileFrontendHooks::onResourceLoaderGetConfigVars(array)
22 #19 /vagrant/mediawiki/includes/resourceloader/ResourceLoaderStartUpModule.php(109): Hooks::run(string, array)
23 #20 /vagrant/mediawiki/includes/resourceloader/ResourceLoaderStartUpModule.php(370): ResourceLoaderStartUpModule->getConfigSettings(DerivativeResourceLoaderContext)
24 #21 /vagrant/mediawiki/includes/resourceloader/ResourceLoaderModule.php(707): ResourceLoaderStartUpModule->getDefinitionSummary(DerivativeResourceLoaderContext)
25 #22 /vagrant/mediawiki/includes/resourceloader/ResourceLoader.php(622): ResourceLoaderModule->getVersionHash(DerivativeResourceLoaderContext)
26 #23 [internal function]: Closure$ResourceLoader::getCombinedVersion(string)
27 #24 /vagrant/mediawiki/includes/resourceloader/ResourceLoader.php(623): array_map(Closure$ResourceLoader::getCombinedVersion;1299315079, array)
28 #25 /vagrant/mediawiki/includes/resourceloader/ResourceLoader.php(675): ResourceLoader->getCombinedVersion(ResourceLoaderContext, array)
29 #26 /vagrant/mediawiki/load.php(43): ResourceLoader->respond(ResourceLoaderContext)
30 #27 /var/www/w/load.php(5): include(string)
31 #28 {main}

Details

Related Gerrit Patches:

Event Timeline

bd808 created this task.Feb 23 2016, 8:51 PM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 23 2016, 8:51 PM

Change 272822 had a related patch set uploaded (by BryanDavis):
Avoid unstubbing $wgUser in MobileFrontendSkinHooks::getPluralLicenseInfo

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

Florian closed this task as Resolved.Feb 24 2016, 6:33 AM

Change 272822 merged by jenkins-bot:
Avoid unstubbing $wgUser in MobileFrontendSkinHooks::getPluralLicenseInfo

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