Page MenuHomePhabricator

It's not possible to remove the priority languages altogether
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Start the translation-marking process on a page with priority languages (like this one)
  • Remove all priority languages
  • Confirm to mark the page for translation

What happens?:

obraz.png (189×622 px, 19 KB)

obraz.png (182×582 px, 18 KB)

What should have happened instead?:
The latest changes should be successfully marked for translation, and there should be no priority languages.

(The bug doesn't happen when at least one priority language is not removed.)

Other information (browser name/version, screenshots, etc.): Firefox 107, Edge 107

Event Timeline

I assume it's this:

Argument 1 passed to ManualLogEntry::setComment() must be of the type string, bool given, called in /srv/mediawiki/php-1.40.0-wmf.10/extensions/Translate/src/PageTranslation/PageTranslationSpecialPage.php on line 1260
from /srv/mediawiki/php-1.40.0-wmf.10/includes/logging/ManualLogEntry.php(190)
#0 /srv/mediawiki/php-1.40.0-wmf.10/extensions/Translate/src/PageTranslation/PageTranslationSpecialPage.php(1260): ManualLogEntry->setComment(boolean)
#1 /srv/mediawiki/php-1.40.0-wmf.10/extensions/Translate/src/PageTranslation/PageTranslationSpecialPage.php(1189): MediaWiki\Extension\Translate\PageTranslation\PageTranslationSpecialPage->handlePriorityLanguages(WebRequest, MediaWiki\Extension\Translate\PageTranslation\TranslatablePage)
#2 /srv/mediawiki/php-1.40.0-wmf.10/extensions/Translate/src/PageTranslation/PageTranslationSpecialPage.php(341): MediaWiki\Extension\Translate\PageTranslation\PageTranslationSpecialPage->markForTranslation(MediaWiki\Extension\Translate\PageTranslation\TranslatablePage, MediaWiki\Extension\Translate\PageTranslation\ParserOutput, array, boolean, boolean)
#3 /srv/mediawiki/php-1.40.0-wmf.10/extensions/Translate/src/PageTranslation/PageTranslationSpecialPage.php(179): MediaWiki\Extension\Translate\PageTranslation\PageTranslationSpecialPage->onActionMark(Title, integer)
#4 /srv/mediawiki/php-1.40.0-wmf.10/includes/specialpage/SpecialPage.php(700): MediaWiki\Extension\Translate\PageTranslation\PageTranslationSpecialPage->execute(NULL)
#5 /srv/mediawiki/php-1.40.0-wmf.10/includes/specialpage/SpecialPageFactory.php(1451): SpecialPage->run(NULL)
#6 /srv/mediawiki/php-1.40.0-wmf.10/includes/MediaWiki.php(311): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#7 /srv/mediawiki/php-1.40.0-wmf.10/includes/MediaWiki.php(902): MediaWiki->performRequest()
#8 /srv/mediawiki/php-1.40.0-wmf.10/includes/MediaWiki.php(560): MediaWiki->main()
#9 /srv/mediawiki/php-1.40.0-wmf.10/index.php(50): MediaWiki->run()
#10 /srv/mediawiki/php-1.40.0-wmf.10/index.php(46): wfIndexMain()
#11 /srv/mediawiki/w/index.php(3): require(string)
#12 {main}

Seems this is an another regression caused by T311567: ManualLogEntry::getComment() should always return string.

abi_ changed the task status from Open to In Progress.Nov 29 2022, 2:18 PM
abi_ claimed this task.
abi_ triaged this task as Medium priority.

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

[mediawiki/extensions/Translate@master] PageTranslationSpecialPage: Fix issue on removing all priority languages

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

Change 861854 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] PageTranslationSpecialPage: Fix error on removing all priority languages

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

The patch has been deployed and tested on Translatewiki.net. Did not notice any error when removing all priority languages from a translatable page.

Thanks @abi_! Unfortunately, I've just experienced this ↓ on MediaWiki.org when trying to mark this page for translation:

obraz.png (181×582 px, 19 KB)

This is odd; MediaWiki.org is group 0 train-wise.

MediaWiki.org is group 0 train-wise.

Yes, but this patch is only MW-1.40-notes (1.40.0-wmf.13; 2022-12-05) train-wise; it was merged only yesterday, more than a day too late to be included in wmf.12. (Translatewiki is not a WMF wiki, so it may be both ahead and behind the train.)