Page MenuHomePhabricator

Marking translations as reviewed fails
Closed, ResolvedPublicPRODUCTION ERROR

Description

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

What happens?:

A yellow background appears.

The message is never marked as reviewed.

Opening the error console, network tab, when clicking on "mark as reviewed", the server sends back a reply like this:

error Object { code: "internal_api_error_TypeError", info: "[f49cf0ba-4cf2-4de4-8080-63ad287aafd3] Caught exception of type TypeError", errorclass: "TypeError" }
servedby "mw1376"

What should have happened instead?:

The message should be marked as reviewed.

Software version Reproduced on www.mediawiki.org

Event Timeline

Tacsipacsi changed the subtype of this task from "Bug Report" to "Production Error".Jul 22 2022, 5:40 PM
Tacsipacsi added a subscriber: Tacsipacsi.
Tacsipacsi added a subscriber: abi_.

I was able to reproduce it locally using the currently deployed wmf/1.39.0-wmf.21 branch, but not the master branch. It looks like it’s been broken by 2e07010, but it has already been inadvertently fixed by 464a6d3, which is to be deployed next week (looks like it was a good idea @abi_ to remove the comment parameter for now). The full stack trace was:

TypeError at /var/www/html/wiki/includes/logging/ManualLogEntry.php(190)
from /var/www/html/wiki/includes/logging/ManualLogEntry.php(190)
#0 /var/www/html/wiki/extensions/Translate/api/ApiTranslationReview.php(101): ManualLogEntry->setComment(NULL)
#1 /var/www/html/wiki/extensions/Translate/api/ApiTranslationReview.php(57): ApiTranslationReview::doReview(User, MediaWiki\Revision\RevisionStoreRecord)
#2 /var/www/html/wiki/includes/api/ApiMain.php(1901): ApiTranslationReview->execute()
#3 /var/www/html/wiki/includes/api/ApiMain.php(875): ApiMain->executeAction()
#4 /var/www/html/wiki/includes/api/ApiMain.php(846): ApiMain->executeActionWithErrorHandling()
#5 /var/www/html/wiki/api.php(90): ApiMain->execute()
#6 /var/www/html/wiki/api.php(45): wfApiMain()
#7 {main}

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

[mediawiki/extensions/Translate@wmf/1.39.0-wmf.21] ReviewTranslationActionApi: Move to namespace and add strict types

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

Change 816272 merged by jenkins-bot:

[mediawiki/extensions/Translate@wmf/1.39.0-wmf.21] ReviewTranslationActionApi: Move to namespace and add strict types

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

Mentioned in SAL (#wikimedia-operations) [2022-07-25T08:15:41Z] <kartik@deploy1002> Synchronized php-1.39.0-wmf.21/extensions/Translate: Backport: [[gerrit:816272|ReviewTranslationActionApi: Move to namespace and add strict types (T312008 T313608)]] (duration: 03m 09s)

Fix for this issue has been backported. It is now working as expected. Thanks you.