Page MenuHomePhabricator

"InvalidArgumentException: $key must be a string or an array" on beta login and vote wikis
Closed, ResolvedPublicBUG REPORT


What is the problem?

On and we are seeing the error:

Original exception: [YN8KHIKRRvrNiQEtWdbNeAAAAAM] /wiki/Main_Page InvalidArgumentException: $key must be a string or an array
from /srv/mediawiki/php-master/includes/language/Message.php(240)
#0 /srv/mediawiki/php-master/includes/GlobalFunctions.php(1183): Message->__construct(integer)
#1 /srv/mediawiki/php-master/includes/context/RequestContext.php(476): wfMessage(integer)
#2 /srv/mediawiki/php-master/includes/context/ContextSource.php(198): RequestContext->msg(integer)
#3 /srv/mediawiki/php-master/includes/skins/Skin.php(2362): ContextSource->msg(integer)
#4 /srv/mediawiki/php-master/includes/skins/Skin.php(2485): Skin->makeLink(integer, array, array)
#5 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(85): Skin->makeListItem(string, array)
#6 /srv/mediawiki/php-master/skins/Vector/includes/SkinVector.php(536): SkinMustache->getPortletData(string, array)
#7 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(244): SkinVector->getPortletData(string, array)
#8 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(199): SkinMustache->getPortletsTemplateData()
#9 /srv/mediawiki/php-master/skins/Vector/includes/SkinVector.php(275): SkinMustache->getTemplateData()
#10 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(137): SkinVector->getTemplateData()
#11 /srv/mediawiki/php-master/includes/skins/SkinTemplate.php(147): SkinMustache->generateHTML()
#12 /srv/mediawiki/php-master/includes/OutputPage.php(2644): SkinTemplate->outputPage()
#13 /srv/mediawiki/php-master/includes/MediaWiki.php(939): OutputPage->output(boolean)
#14 /srv/mediawiki/php-master/includes/MediaWiki.php(952): MediaWiki::{closure}()
#15 /srv/mediawiki/php-master/includes/MediaWiki.php(559): MediaWiki->main()
#16 /srv/mediawiki/php-master/index.php(53): MediaWiki->run()
#17 /srv/mediawiki/php-master/index.php(46): wfIndexMain()
#18 /srv/mediawiki/w/index.php(3): require(string)
#19 {main}

This only seems to happen when you are logged out and using the new version of the Vector skin. Therefore, tagging Desktop Improvements.

So you see the error if you go to but not or

Nor does it happen on other beta sites, e.g.

Steps to reproduce problem
  1. Go to or

Wiki(s): MediaWiki 1.37.0-alpha (780ed06) 06:20, 2 July 2021. Vector 1.0.0 (f3a4f9c) 06:32, 2 July 2021.

Event Timeline

taavi triaged this task as Unbreak Now! priority.Jul 3 2021, 4:11 PM
taavi subscribed.

(as a train blocker)

Change 704358 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] links is flat array

@bwang @Jdlrobson Checking in on status since this is a blocker for this week's train. Is anyone willing to +2 (and also make a cherry-pick for wmf.14)?

Change 704358 merged by jenkins-bot:

[mediawiki/core@master] links is flat array

Change 704368 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@wmf/1.37.0-wmf.14] links is flat array

Hey @dancy just back from vacation, so catching up. We've merged a patch to master and are just waiting for it to end up on the beta cluster so we can verify it addresses this problem. Have no idea why it's only impacting certain wikis though. I imagine there is something different in the configuration on the target wikis.

Jdlrobson added a subscriber: bwang.

Change 704368 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.14] links is flat array

Jdlrobson lowered the priority of this task from Unbreak Now! to Medium.Jul 13 2021, 8:06 PM

Mentioned in SAL (#wikimedia-operations) [2021-07-13T20:30:54Z] <dancy@deploy1002> Synchronized php-1.37.0-wmf.14/includes/skins/Skin.php: Backport: [[gerrit:704368|links is flat array (T286040)]] (duration: 02m 07s)