Page MenuHomePhabricator

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

Description fails with

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


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. 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):

or ContentTranslation needs to be updated to check it's an array:

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

Change 682952 merged by jenkins-bot:

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