Page MenuHomePhabricator

Content Translation redirects back to "Start translation" when dashboard is loaded from contribution menu
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce:

  • Go to English Wikipedia. Login. Enable ContentTranslation from Beta feature.
  • Click on the Contributions menu.
  • Click on "Translations", it will open the ContentTranslation dashboard.
  • On the dashboard, click "New translation" or select an article to translate from suggestions to start the translation.

What happens?:

  • It brings you back to the same page with the "Start translation" button.

What should have happened instead?:

  • Once you click on the "Start translation" button, it will take you to the page where you start translating the article from one language to another.

Note: ContentTranslation is working fine if the dashboard is loaded directly instead of the "Contribution" menu.

One of the users has reported a similar issue with a screenshot and log. Although, there was no similar error seen in other cases.

Many other commenters report the same problem at https://www.mediawiki.org/wiki/Talk:Content_translation

Event Timeline

KartikMistry renamed this task from The "Start translation" page redirects to the same "Start translation page in Content Translation tool to Content Translation redirects back to "Start translation" when dashboard is loaded from contribution menu.May 20 2022, 4:21 AM
KartikMistry updated the task description. (Show Details)
KartikMistry updated the task description. (Show Details)
KartikMistry added a subscriber: santhosh.

Looks like this problem is happening when people are on the source project, if they go to the target project before starting the translation to the target project it seems to be working, as reported in https://en.wikipedia.org/wiki/Wikipedia_talk:Content_translation_tool#Tool_stopped_working

Change 796752 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] Sitemapper: Fix the configuration override

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

This was a regression from https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/786324

The $.extend function in jQuery modifies the first object passed. Here it is a the config object from require( '../config.json' ). This is a not a real file import, but a ResourceLoader package file approach for importing. The config.json is mutable there.

Once config.json is modified, it applies to all later instantiation of mw.cx.SiteMapper and hence we were getting TranslateInTarget as false. This was leading to buggy redirects to same wiki for CX when a new translation is started.

To test, go to Special:CX page in anywiki, in browser dev console. running mw.cx.siteMapper.translateInTarget should give true for all production wikis. Currently it is false. After the fix, it should show true

The redirection issue will not happen if a translation for a target language is started in target language wiki. It happens only when the current wiki is not target language.

Change 796351 had a related patch set uploaded (by KartikMistry; author: Santhosh):

[mediawiki/extensions/ContentTranslation@wmf/1.39.0-wmf.12] Sitemapper: Fix the configuration override

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

Change 796351 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@wmf/1.39.0-wmf.12] Sitemapper: Fix the configuration override

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

Mentioned in SAL (#wikimedia-operations) [2022-05-23T07:25:40Z] <kartik@deploy1002> Synchronized php-1.39.0-wmf.12/extensions/ContentTranslation/modules/base/mw.cx.SiteMapper.js: Backport: [[gerrit:796351|Sitemapper: Fix the configuration override (T308802)]] (duration: 00m 51s)

Change 796752 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Sitemapper: Fix the configuration override

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

Using the steps The CX tool is working as expected:

  • Go to English Wikipedia. Login. Enable ContentTranslation from Beta feature.
  • Click on the Contributions menu.
  • Click on "Translations", it will open the ContentTranslation dashboard.
  • On the dashboard, click "New translation" or select an article to translate from suggestions to start the translation.

I did also test changing the translation engine to ensure that is working properly

Also check to ensure that 96% maximum for unmodified text message is displayed when a user tries to publish unmodified texts