Page MenuHomePhabricator

FlowHooks::onMessageCacheGet() may be called during load.php and depends on the session user language
Closed, ResolvedPublic

Description

URL: https://test2.wikipedia.org/w/load.php?debug=false&lang=fr&modules=startup&only=scripts&skin=vector
URL: https://www.mediawiki.org/w/load.php?debug=false&lang=he&modules=startup&only=scripts&skin=vector

/srv/mediawiki/php-1.27.0-wmf.16/includes/session/SessionManager.php:296
/srv/mediawiki/php-1.27.0-wmf.16/includes/session/SessionManager.php:230
/srv/mediawiki/php-1.27.0-wmf.16/includes/session/SessionManager.php:184
/srv/mediawiki/php-1.27.0-wmf.16/includes/WebRequest.php:664
/srv/mediawiki/php-1.27.0-wmf.16/includes/user/User.php:1214
/srv/mediawiki/php-1.27.0-wmf.16/includes/user/User.php:402
/srv/mediawiki/php-1.27.0-wmf.16/includes/user/User.php:5127
/srv/mediawiki/php-1.27.0-wmf.16/includes/user/User.php:2750
/srv/mediawiki/php-1.27.0-wmf.16/includes/context/RequestContext.php:368
/srv/mediawiki/php-1.27.0-wmf.16/includes/StubObject.php:204
/srv/mediawiki/php-1.27.0-wmf.16/includes/StubObject.php:160
/srv/mediawiki/php-1.27.0-wmf.16/includes/StubObject.php:104
/srv/mediawiki/php-1.27.0-wmf.16/includes/StubObject.php:179
/srv/mediawiki/php-1.27.0-wmf.16/includes/cache/MessageCache.php:824
/srv/mediawiki/php-1.27.0-wmf.16/includes/cache/MessageCache.php:767
/srv/mediawiki/php-1.27.0-wmf.16/includes/Message.php:1148
/srv/mediawiki/php-1.27.0-wmf.16/includes/Message.php:910
/srv/mediawiki/php-1.27.0-wmf.16/extensions/Flow/Hooks.php:1060
/srv/mediawiki/php-1.27.0-wmf.16/includes/Hooks.php:195
/srv/mediawiki/php-1.27.0-wmf.16/includes/cache/MessageCache.php:759
/srv/mediawiki/php-1.27.0-wmf.16/includes/Message.php:1148
/srv/mediawiki/php-1.27.0-wmf.16/includes/Message.php:771
/srv/mediawiki/php-1.27.0-wmf.16/includes/Message.php:874
/srv/mediawiki/php-1.27.0-wmf.16/includes/cache/MessageBlobStore.php:220
/srv/mediawiki/php-1.27.0-wmf.16/includes/cache/MessageBlobStore.php:240
/srv/mediawiki/php-1.27.0-wmf.16/includes/cache/MessageBlobStore.php:163
/srv/mediawiki/php-1.27.0-wmf.16/includes/cache/MessageBlobStore.php:116
/srv/mediawiki/php-1.27.0-wmf.16/includes/resourceloader/ResourceLoader.php:152
/srv/mediawiki/php-1.27.0-wmf.16/includes/resourceloader/ResourceLoaderStartUpModule.php:392
/srv/mediawiki/php-1.27.0-wmf.16/includes/resourceloader/ResourceLoaderStartUpModule.php:374
/srv/mediawiki/php-1.27.0-wmf.16/includes/resourceloader/ResourceLoaderModule.php:707
/srv/mediawiki/php-1.27.0-wmf.16/includes/resourceloader/ResourceLoader.php:622
{"function":"Closure$ResourceLoader::getCombinedVersion","args":["startup"]}
/srv/mediawiki/php-1.27.0-wmf.16/includes/resourceloader/ResourceLoader.php:623
/srv/mediawiki/php-1.27.0-wmf.16/includes/resourceloader/ResourceLoader.php:675
/srv/mediawiki/php-1.27.0-wmf.16/load.php:44
/srv/mediawiki/w/load.php:3

I note most requests don't seem to hit this, it probably depends on stuff expiring from MessageBlobStore's cache.

I don't know why this code exists in Flow in the first place, instead of being part of WikimediaMessagesHooks::onMessageCacheGet().

Event Timeline

Change 280587 had a related patch set uploaded (by Legoktm):
Add Flow terms of use messages to onMessageCacheGet hook handler

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

Change 280588 had a related patch set uploaded (by Legoktm):
Remove Wikimedia-specific MessageCache::get hook handler

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

Change 280587 merged by jenkins-bot:
Add Flow terms of use messages to onMessageCacheGet hook handler

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

Change 280588 merged by jenkins-bot:
Remove Wikimedia-specific MessageCache::get hook handler

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