Page MenuHomePhabricator

Argument 1 passed to MediaWiki\Linker\LinkRenderer::makeLink() must implement interface MediaWiki\Linker\LinkTarget, null given, called in /srv/mediawiki/php-1.35.0-wmf.24/extensions/Translate/specials/SpecialSupportedLanguages.php on line 367
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.24

message
Argument 1 passed to MediaWiki\Linker\LinkRenderer::makeLink() must implement interface MediaWiki\Linker\LinkTarget, null given, called in /srv/mediawiki/php-1.35.0-wmf.24/extensions/Translate/specials/SpecialSupportedLanguages.php on line 367

Impact

Notes

Details

Request ID
XnPLQQpAAEUAADSsBo4AAADV
Request URL
https://meta.wikimedia.org/wiki/Special:SupportedLanguages/ar
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.35.0-wmf.24/extensions/Translate/specials/SpecialSupportedLanguages.php(367): MediaWiki\Linker\LinkRenderer->makeLink(NULL, HtmlArmor, array)
#1 /srv/mediawiki/php-1.35.0-wmf.24/extensions/Translate/specials/SpecialSupportedLanguages.php(145): SpecialSupportedLanguages->makeUserList(array, array)
#2 /srv/mediawiki/php-1.35.0-wmf.24/extensions/Translate/specials/SpecialSupportedLanguages.php(90): SpecialSupportedLanguages->showLanguage(string, array)
#3 /srv/mediawiki/php-1.35.0-wmf.24/includes/specialpage/SpecialPage.php(575): SpecialSupportedLanguages->execute(string)
#4 /srv/mediawiki/php-1.35.0-wmf.24/includes/specialpage/SpecialPageFactory.php(622): SpecialPage->run(string)
#5 /srv/mediawiki/php-1.35.0-wmf.24/includes/MediaWiki.php(299): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#6 /srv/mediawiki/php-1.35.0-wmf.24/includes/MediaWiki.php(973): MediaWiki->performRequest()
#7 /srv/mediawiki/php-1.35.0-wmf.24/includes/MediaWiki.php(535): MediaWiki->main()
#8 /srv/mediawiki/php-1.35.0-wmf.24/index.php(47): MediaWiki->run()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}

Event Timeline

hashar triaged this task as Unbreak Now! priority.EditedMar 19 2020, 8:00 PM

Which gives me a fatal error when browsing the webpage!

https://meta.wikimedia.org/wiki/Special:SupportedLanguages/ar

Browsing https://meta.wikimedia.org/wiki/Special:SupportedLanguages gives a list of languages. I have browsed a few of them. They initially took time to load but managed to render something:

Anyway ar always fatal out.

SpecialSupportedLanguages->makeUserList(array, array)
MediaWiki\Linker\LinkRenderer->makeLink(NULL, HtmlArmor, array)

So I guess there is a translator for the ar language which has an invalid name / article of some sort.

They are slow yes, probably gotten slower with the actor changes. The latest relevant change has been there since 1.35.0-wmf.21. I don't think this needs to block the train, but if it causes issues, it's okay to disable the special page.

hashar lowered the priority of this task from Unbreak Now! to High.Mar 19 2020, 8:10 PM

Thank you @Nikerabbit!

The fatal error is a bit cumbersome though, it deserves some investigation I guess.

Change 582793 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] SpecialSupportedLanguages: Avoid fatals and add debugging

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

Change 582793 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] SpecialSupportedLanguages: Avoid fatals and add debugging

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

Log output: T248125: Got Title-invalid username 'imported>Hshammaa'

What are these, and how are they supposed to be handled?

Well, since cannot be real users, no point listing them on this page, so the current behavior of ignoring them seems fine. It seems okay to leave the logging in place for time being though, and the fatal no longer happens.

Log output: T248125: Got Title-invalid username 'imported>Hshammaa'

What are these, and how are they supposed to be handled?

That seems to come from includes/user/ExternalUserNames.php:

class ExternalUserNames {

    private $usernamePrefix = 'imported';

     // @param string $usernamePrefix Prefix to apply to unknown (and possibly also known) usernames
    public function __construct( $usernamePrefix, $assignKnownUsers ) {
        $this->usernamePrefix = rtrim( (string)$usernamePrefix, ':>' );

If one want to link to the user, there is a getUserLinkTitle method.

I guess the code to list the contributors ends up returning some ExternalUserNames objects in addition to regular local users?

As far as I can see, getUserLinkTitle would also return null for these, so skipping them is still appropriate.

Nikerabbit claimed this task.