Page MenuHomePhabricator

Argument 1 passed to MediaWiki\Babel\BabelStatic::onLinksUpdate() must be an instance of MediaWiki\Deferred\LinksUpdate\LinksUpdate, instance of LinksUpdate given
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Mark a page for translation
  • Translate it to a language
  • Run MediaWiki - maintenance/runJobs.php

What happens?:
You get the following error:

2022-04-26 05:54:41 refreshLinksPrioritized Translations:MLEB_2022_04/Page_display_title/es namespace=1198 title=MLEB_2022_04/Page_display_title/es rootJobTimestamp=20220426055439 useRecursiveLinksUpdate=1 triggeringUser={"userId":1,"userName":"Admin"} triggeringRevisionId=369 causeAction=edit-page causeAgent=Admin requestId=bc8efd5ee51e98a8a9905fc9 (id=5052,timestamp=20220426055439) t=142 error=TypeError: Argument 1 passed to MediaWiki\Babel\BabelStatic::onLinksUpdate() must be an instance of MediaWiki\Deferred\LinksUpdate\LinksUpdate, instance of LinksUpdate given, called in /var/www/mleb/core/includes/HookContainer/HookContainer.php on line 338

What should have happened instead?:
Should not have had an error

Software version:

  • MW 1.36 (Babel is part of MLEB that should support last 2 versions of MediaWiki)
  • Babel master

Event Timeline

abi_ triaged this task as High priority.
abi_ added a parent task: T305141: Release MLEB 2022.04.

Change 786272 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Babel@master] Remove type hint from onLinksUpdate

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

Change 786272 merged by jenkins-bot:

[mediawiki/extensions/Babel@master] Remove type hint from onLinksUpdate

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

Umherirrender subscribed.

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/745756 namespaced the LinksUpdate class and adds an alias.
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Babel/+/762905 used that new namespace (and no longer the alias) and the alias is not part of older releases (alias added in 1.38) which broke as mention here.

Without type hint it looks okay. The type in the @param is now using the alias again, but that should not hurt.