Page MenuHomePhabricator

ApiContentTranslationSave fails with "Exception: Failed to update a translation section"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request ID: W9tVLQpAAE0AADZGhQsAAAAI
Request URL: /w/api.php
Request Method: POST

message
Exception: Failed to update a translation section
trace
#0 /srv/mediawiki/php-1.33.0-wmf.1/extensions/ContentTranslation/includes/TranslationStorageManager.php(149): ContentTranslation\TranslationStorageManager::update(Wikimedia\Rdbms\DatabaseMysqli, ContentTranslation\TranslationUnit, string)
#1 /srv/mediawiki/php-1.33.0-wmf.1/includes/libs/rdbms/database/Database.php(3807): Closure$ContentTranslation\TranslationStorageManager::save(Wikimedia\Rdbms\DatabaseMysqli, string)
#2 /srv/mediawiki/php-1.33.0-wmf.1/includes/libs/rdbms/database/DBConnRef.php(49): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure$ContentTranslation\TranslationStorageManager::save;1392)
#3 /srv/mediawiki/php-1.33.0-wmf.1/includes/libs/rdbms/database/DBConnRef.php(538): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#4 /srv/mediawiki/php-1.33.0-wmf.1/extensions/ContentTranslation/includes/TranslationStorageManager.php(154): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure$ContentTranslation\TranslationStorageManager::save;1392)
#5 /srv/mediawiki/php-1.33.0-wmf.1/extensions/ContentTranslation/api/ApiContentTranslationSave.php(225): ContentTranslation\TranslationStorageManager::save(ContentTranslation\TranslationUnit, boolean)
#6 /srv/mediawiki/php-1.33.0-wmf.1/extensions/ContentTranslation/api/ApiContentTranslationSave.php(72): ApiContentTranslationSave->saveTranslationUnits(array, ContentTranslation\Translation)
#7 /srv/mediawiki/php-1.33.0-wmf.1/includes/api/ApiMain.php(1570): ApiContentTranslationSave->execute()
#8 /srv/mediawiki/php-1.33.0-wmf.1/includes/api/ApiMain.php(531): ApiMain->executeAction()
#9 /srv/mediawiki/php-1.33.0-wmf.1/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#10 /srv/mediawiki/php-1.33.0-wmf.1/api.php(87): ApiMain->execute()

Impact

Unknown.

Based on the trace and request details (POST from web browser JavaScript with Special:ContentTranslation as referer), I would guess this means some of all of ContentTranslation features are not working in certain cases and users receive a technical error message without further instructions or details. To be confirmed.

Notes

Recorded 163 times in Logstash in the last 30 days since at least 1.32-wmf.24.

Event Timeline

This is when SQL update command returns 0 rows affected.

I see a relatively high (25 in the last 15 minutes) number of exceptions on /w/api.php?action=translationaids with:

[{exception_id}] {exception_url} InvalidArgumentException from line 333 of /srv/mediawiki/php-1.33.0-wmf.20/includes/Revision/RevisionStore.php: $pageId and $revId cannot both be 0 or null

Is this related or should I file a new ticket?

Sorry, my fault, I had not refreshed my browser.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM
Nikerabbit claimed this task.

No longer happening in Logstash. There are other issues with the saving but they have their own issues.