Page MenuHomePhabricator

Beta cluster Special:ContentTranslation Error: Unsupported operand types
Closed, ResolvedPublic

Description

https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Special:ContentTranslation fails with

[YENJy6wQBHcAAGBPqYQAAAAG] /w/index.php?title=Special:ContentTranslation Error: Unsupported operand types

Backtrace:

from /srv/mediawiki/php-master/extensions/ContentTranslation/specials/ContentTranslationSpecialPage.php(286)
#0 /srv/mediawiki/php-master/extensions/ContentTranslation/specials/ContentTranslationSpecialPage.php(143): ContentTranslationSpecialPage->getProjectWordmark()
#1 /srv/mediawiki/php-master/extensions/ContentTranslation/specials/ContentTranslationSpecialPage.php(69): ContentTranslationSpecialPage->createHeaderHtml()
#2 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(646): ContentTranslationSpecialPage->execute(NULL)
#3 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(1383): SpecialPage->run(NULL)
#4 /srv/mediawiki/php-master/includes/MediaWiki.php(309): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#5 /srv/mediawiki/php-master/includes/MediaWiki.php(925): MediaWiki->performRequest()
#6 /srv/mediawiki/php-master/includes/MediaWiki.php(547): MediaWiki->main()
#7 /srv/mediawiki/php-master/index.php(53): MediaWiki->run()
#8 /srv/mediawiki/php-master/index.php(46): wfIndexMain()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}

Event Timeline

Note: you must be logged in order to reproduce this bug.

Also, I'm not getting why it's reported on line 286, but I guess the + operator at line 284 is failing because $siteLogos[ 'wordmark' ] is not an array. Which would point to a config error.

@Jdlrobson You are the only one who I remember touching beta logos recently. Maybe you want to have a look?

Restricted Application added a subscriber: Zabe. · View Herald TranscriptApr 6 2021, 8:38 PM

wmgSiteLogoWordmark is set to false.

https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/ContentTranslation/+/8b37d2de56a4ba7c2bb0cb1770fadd8643938268/specials/ContentTranslationSpecialPage.php#284 assumes that it's always an array when set.

Either the configuration line needs to be changed to unset this value rather than set it to false (not sure if that's possible):
https://gerrit.wikimedia.org/g/operations/mediawiki-config/+/9f6f8f124dcd3e45b33f264ac130ef1400e560e2/wmf-config/InitialiseSettings-labs.php#392

or ContentTranslation needs to be updated to check it's an array:
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/ContentTranslation/+/8b37d2de56a4ba7c2bb0cb1770fadd8643938268/specials/ContentTranslationSpecialPage.php#284

I'm out on vacation shortly so won't be able to look into this myself but those would be the appropriate solutions here depending on whether we decide wgLogos should accept false values.

Pginer-WMF triaged this task as Medium priority.

Change 682952 had a related patch set uploaded (by Nikerabbit; author: Nikerabbit):

[mediawiki/extensions/ContentTranslation@master] Avoid wordmark related fatal

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

Change 682952 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Avoid wordmark related fatal

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