Topic on Talk:Content translation

Uneditable translations

4
Andrei Stroe (talkcontribs)

I've been working on a couple of long translations (Norway, for example, from en to ro), and now none of them is editable. The text is fully loaded, but greyed out, paragraphs can neither be edited, nor added.

Javascript console (Chromium, Linux) contains the following error:

/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:176 TypeError: Cannot read property 'innerHTML' of null TypeError: Cannot read property 'innerHTML' of null
   at eval (eval at <anonymous> (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:4), <anonymous>:515:1384)
   at Object.<anonymous> (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:161)
   at fire (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:45)
   at Object.add [as done] (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:45)
   at Object.always (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:46)
   at runScript (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:161)
   at checkCssHandles (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:162)
   at execute (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:162)
   at Object.implement (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:169)
   at eval (eval at <anonymous> (/w/load.php?debug=false&lang=ro&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1rfuz0b:4), <anonymous>:515:1101)

I could save my work to a draft, and I would restart the translation, only that is impossible: once started, a translation cannot be reset.

Amire80 (talkcontribs)

Can you please try the same with &debug=true in the URL and post the JS console result again?

I suspect that it's an issue with one of the gadgets or the user scripts that you use, and running this with debug=true will help debugging it.

Andrei Stroe (talkcontribs)

You were right, I identified the gadget and disabled it. The error had nothing to do with it.

Unfortunately, even though the error is gone, the page is still not editable. The debug log is pretty huge, but what catches my eye is that in the whole exchange of XHR data between the content editor and the server, there is one request that doesn't finish. Debug data from the Chromium developer tools console shows its data as:

Request URL: https://ro.wikipedia.org/w/api.php

Headers:

  1. Accept: application/json, text/javascript, */*; q=0.01
  2. Content-Type: application/x-www-form-urlencoded; charset=UTF-8
  3. Origin: https://ro.wikipedia.org
  4. Referer: https://ro.wikipedia.org/wiki/Special:ContentTranslation?page=Norway&from=en&to=ro&targettitle=Norvegia&revision=741251081
  5. X-Requested-With: XMLHttpRequest

Form data:

  1. action: cxsave
  2. format: json
  3. assert: user
  4. content: rawdeflate, 7H3bcttIsuCvVPhEn7XDlEXwCtp9EEHJsiW3ZFs3u93TJxh....... and this is pretty huge, it goes on with hundreds of rows of hundreds of symbols (it's probably the entire content of the translation)
  5. from:en
  6. to: ro
  7. sourcetitle: Norway
  8. title: Norvegia
  9. sourcerevision: 741251081
  10. progress: {"any":0.6308915262775777,"human":0.6155635566223645,"mt":0.015327969655213288,"mtSectionsCount":33}

Headers also contain User-Agent and form data contains the token, but I did not mention those. The browser does not register any response.

Amire80 (talkcontribs)

Hmm, the XHR that cannot finish is problematic, and I reported it for further investigation at https://phabricator.wikimedia.org/T157121. However, by itself it's not supposed to prevent you from editing. Can you see any other red JavaScript errors in the console?

Reply to "Uneditable translations"