Some translations can't be published after deploying the new CX template editor and give docserver-http: HTTP 400
Closed, ResolvedPublic

Description

I tested template translation after the deployment on Thursday December 1 2016.

I couldn't publish a translation from Hebrew to Spanish or French. I repeatedly got "docserver-http: HTTP 400".

It worked correctly when translating from English or Catalan into Spanish.

I tried the article "מגדל שלום מאיר" and several others.

Amire80 created this task.Dec 1 2016, 9:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 1 2016, 9:28 PM

Do you have the title of the article on the target wiki?

The title of the article in the target wiki is "Usuario:Amire80/Migdal Shalom 12-5-1" (in the user namespace, "Usuario").

I tried this again today December 5 at 09:39 AM UTC.

I received several other complaints about it. One on Talk:CX: https://www.mediawiki.org/wiki/Topic:Tgh3cf65cf0upl26. It says that the user could not translate H. M. S. Richards to Spanish, and this means that it is not unique to Hebrew. I received a couple of other complaints over email.

Amire80 changed the title from "Translation from Hebrew to Spanish doesn't work: docserver-http: HTTP 400" to "Some translations can't be published after deploying the new CX template editor and give docserver-http: HTTP 400".Dec 5 2016, 9:43 AM
Amire80 triaged this task as "High" priority.
Arrbee added a subscriber: Arrbee.Dec 6 2016, 4:13 AM

I received a couple of other complaints over email.

Can you please list the articles with the language pairs on this ticket?

santhosh added a subscriber: santhosh.EditedDec 6 2016, 5:01 AM

I am able to reproduce this and it is independent of language or title. I got the smallest HTML snippet that can cause the parsing system failure

<span about="#mwt5" class="mw-ref" id="cxcite_ref-2" rel="dc:references" typeof="mw:Transclusion  mw:Extension/ref"></span>

Just paste this html in HTML field of https://ml.wikipedia.org/api/rest_v1/#!/Transforms/post_transform_html_to_wikitext_title_revision - 400 is guaranteed.
This HTML snippet was output of Yandex MT. data-mw is missing.

I also found that removing mw:Transclusion from typeof attribute makes the parser working

<span about="#mwt5" class="mw-ref" id="cxcite_ref-2" rel="dc:references" typeof="mw:Extension/ref"></span>

That also mean the following snippet is enough to create 400

<span typeof="mw:Transclusion"></span>

And this is expected behavior from parsoid https://github.com/wikimedia/parsoid/blob/master/tests/mocha/api.js#L1231

So from CX, we should avoid creating HTML without data-mw if typeof=mw:Transclusion

Change 325520 had a related patch set uploaded (by Santhosh):
For unadapted inline templates, ensure data-mw even after MT

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

santhosh claimed this task.Dec 6 2016, 9:48 AM

Change 325520 merged by jenkins-bot:
For unadapted inline templates, ensure data-mw even after MT

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

Amire80 moved this task from QA to Done on the Language-Q2-2016-17 Sprint 5 board.Dec 9 2016, 7:24 AM

Verified in production.

Arrbee closed this task as "Resolved".Dec 14 2016, 7:02 AM