Change to a single translation unit refreshed the whole page with an obsolete content
Closed, ResolvedPublic

Description

Example from Wikidata: this change competely broke (removed syntax, re-introduced typos...) the translated content. It looks like older revisions of translation units got loaded.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptWed, May 23, 8:31 AM
Nikerabbit triaged this task as Unbreak Now! priority.EditedWed, May 23, 10:17 AM
Nikerabbit claimed this task.
Nikerabbit added subscribers: Anomie, Nikerabbit.

@Anomie I tracked this to this code in MessageCollection

		if ( is_callable( Revision::class, 'getQueryInfo' ) ) {
			$revQuery = Revision::getQueryInfo( [ 'page', 'text' ] );
		} else {
			$revQuery = [
				'tables' => [ 'page', 'revision', 'text' ],
				'fields' => [
					'page_namespace',
					'page_title',
					'page_latest',
					'rev_user',
					'rev_user_text',
					'old_flags',
					'old_text'
				],
				'joins' => [
					'revision' => [ 'JOIN', 'page_latest = rev_id' ],
					'text' => [ 'JOIN', 'old_id = rev_text_id' ],
				],
			];
		}
		$conds = [];
		$conds[] = $this->getTitleConds( $dbr );

		$res = $dbr->select(
			$revQuery['tables'], $revQuery['fields'], $conds, __METHOD__, [], $revQuery['joins']
		);

Revision::getQueryInfo does not include the condition 'page_latest = rev_id' and hence we might get random revision instead of the latest one. Is this a bug in Revision::getQueryInfo or did we forget to add that condition to that code path?

After fixing this we should run refresh-translatable-pages.php on all wikis.

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptWed, May 23, 10:17 AM

Change 434660 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Stop stale translations appearing on translation pages

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

Nikerabbit lowered the priority of this task from Unbreak Now! to High.Wed, May 23, 10:47 AM
Nikerabbit moved this task from Backlog to In Review on the Language-2018-Apr-June board.

Change 434660 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Stop stale translations appearing on translation pages

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

Change 434699 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@wmf/1.32.0-wmf.5] Stop stale translations appearing on translation pages

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

Change 434700 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@wmf/1.32.0-wmf.4] Stop stale translations appearing on translation pages

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

Change 434699 merged by jenkins-bot:
[mediawiki/extensions/Translate@wmf/1.32.0-wmf.5] Stop stale translations appearing on translation pages

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

Change 434700 merged by jenkins-bot:
[mediawiki/extensions/Translate@wmf/1.32.0-wmf.4] Stop stale translations appearing on translation pages

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

Mentioned in SAL (#wikimedia-operations) [2018-05-23T17:45:10Z] <twentyafterfour@tin> Synchronized php-1.32.0-wmf.5/extensions/Translate/MessageCollection.php: syncing https://gerrit.wikimedia.org/r/#/c/434699/ refs T195347 (duration: 01m 20s)

Mentioned in SAL (#wikimedia-operations) [2018-05-23T17:47:09Z] <twentyafterfour@tin> Synchronized php-1.32.0-wmf.4/extensions/Translate/MessageCollection.php: syncing https://gerrit.wikimedia.org/r/#/c/434700/ refs T195347 (duration: 01m 19s)

https://www.wikidata.org/w/index.php?title=Wikidata:News/cs&diff=prev&oldid=683956646

Pages will automatically heal themselves if they are edited. I'll probably plan the maintenance scripts to update all pages to be run next week. Leaving the task open for that.

Change 436728 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] refresh-translatable-pages.php: add JobQueue option

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

Change 436728 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] refresh-translatable-pages.php: add JobQueue option

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

Script has been run for pretty much all wikis except metawiki and mediawikiwiki. I will attempt those two again next week with the updated script.

Arrbee moved this task from In Review to QA on the Language-2018-Apr-June board.Mon, Jun 4, 7:18 AM
Nikerabbit moved this task from QA to Done on the Language-2018-Apr-June board.Wed, Jun 13, 7:04 AM
Nikerabbit closed this task as Resolved.Wed, Jun 13, 7:17 AM

This has now been done for all wikis. MetaWiki took about one hour with the updated script, which is really fast.

https://meta.wikimedia.org/w/index.php?title=Special:Contributions&limit=500&contribs=user&target=FuzzyBot&namespace=&tagfilter=&start=2018-06-13&end=2018-06-13 shows the changes. It looks there has been other bugs, mainly missing /en pages and the latest change to display fuzzy messages again, which had not been propagated to all pages yet, that are all nw fixed.

Finally, thanks for your effort @Nikerabbit!