Page MenuHomePhabricator

Publishing the translation for a new article to the sandbox does not redirect to the page
Closed, ResolvedPublic

Description

Translating Avocado toast on Thai Wikipedia and published the translation as a new article to the sandbox does not redirect the user to the published page. The page got actually published and the success message is shown, but redirection does not happen keeping the user with this view:

Screenshot 2021-12-15 at 17.10.12 2.png (906×1 px, 447 KB)

The expected behaviour is for the user to be redirected to the published page.

The error in the Javascript console:

load.php?lang=en&modules=jquery|mw.cx3&skin=contenttranslation&version=1lxys:146 GET https://cxserver.wikimedia.org/v2/suggest/sections/Avocado%20toast/en/th 404

load.php?lang=en&modules=jquery|mw.cx3&skin=contenttranslation&version=1lxys:146 Uncaught (in promise) no-external-page

Event Timeline

Pginer-WMF triaged this task as Medium priority.Dec 15 2021, 4:25 PM
Pginer-WMF created this task.

This is a problem is caused by the request to link the article created in wikidata. Although, there is a comment about failure being acceptable for this request, the error is not caught, leading to the above behaviour. This request should not even happen for publishing to user's sandbox, but an exception handling should also be added.

Change 747569 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Avoid wikibase link request for sandbox publishing

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

Change 747569 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Avoid wikibase link request for sandbox publishing

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

In addition to avoiding the request for the sandbox, would it make sense for publishing in main namespace that in case Wikidata addition fails (imagine Wikidata is down) the publishing process does not break and the user gets redirected to the published page?

Yes, this is also being taken care of, in the patch above. Copying from the patch description: "This patch also adds a catch block to catch any errors of the wikibase link request, since such failure is acceptable.". This refers to the exact same thing you are referring to.

Yes, this is also being taken care of, in the patch above. Copying from the patch description: "This patch also adds a catch block to catch any errors of the wikibase link request, since such failure is acceptable.". This refers to the exact same thing you are referring to.

It seems I was in a rush and didn't see that despite being in front of my eyes. Thanks for taking this into account and confirming, Nik!

Change 747569 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Avoid wikibase link request for sandbox publishing

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

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

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20220110

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

Change 752530 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20220110

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