Page MenuHomePhabricator

Images Globalusage on testwiki shows mediawiki message keys for the site names (due to local customization)
Closed, ResolvedPublic

Event Timeline

The code looks like:

includes/GlobalUsageImagePageHooks.php
foreach ( $query->getSingleImageResult() as $wiki => $result ) {
    $wikiName = WikiMap::getWikiName( $wiki );
    $escWikiName = Sanitizer::escapeClass( $wikiName );
    $guHtml .= "<li class='mw-gu-onwiki-$escWikiName'>" . $context->msg(
        'globalusage-on-wiki',
        $targetName, $wikiName )->parse() . "\n<ul>";
    foreach ( $result as $item ) {
        $guHtml .= "\t<li>" . SpecialGlobalUsage::formatItem( $item ) . "</li>\n";
    }
    $guHtml .= "</ul></li>\n";
}

WikiMap got moved around in e109c1e8f1a87d2f5a9272403b096024803d198a but that was already in 1.41.0-wmf.7.

Is this testwiki only? The relevant localisation message has some weird customization there: https://test.wikipedia.org/w/index.php?title=MediaWiki:Globalusage-on-wiki&action=edit

Ah yes that would be it! :) Maybe nobody has noticed the issue so far?

I dont see any page matching MediaWiki:Wiki-name* using https://test.wikipedia.org/wiki/Special:PrefixIndex?prefix=Wiki-name&namespace=8

So I guess one can remove that faulty https://test.wikipedia.org/w/index.php?title=MediaWiki:Globalusage-on-wiki and that fixes it.

hashar assigned this task to matmarex.

Root cause found by @matmarex was that testwiki had a local customization of an i18n message made back in year 2010!

MediaWiki:Globalusage-on-wiki
Usage on {{MediaWiki:Wiki-name-$2}}

I have deleted that page which now shows the default:

Usage on $2

Which has instantly fixed https://test.wikipedia.org/wiki/File:Working_Wikimedian%27s_Barnstar.png resolving the issue.

Congratulations @matmarex !

Aklapper renamed this task from Images Globalusage shows mediawiki message keys for the site names to Images Globalusage on testwiki shows mediawiki message keys for the site names (due to local customization).May 9 2023, 7:22 PM