Last modified: 2014-04-15 03:59:56 UTC
Not sure if this should be filed under VisualEditor or Translate. When clicking the "edit source" button on a translation or a page that uses the Translate extension, it isn't possible to edit the wikitext directly; instead, the user is told to use the Translate extension to change the content. When clicking the "edit" button on a translation of a page that uses the Translate extension, it's possible to edit the text with VisualEditor. At first, I thought this was a feature, and that changes would be propagated to the Translate extension, until I tried to save the page and got the following error: Error saving data to server: Unsuccessful request: Unknown error: "tpt-target-page". If VisualEditor can't be used to edit those pages, it probably shouldn't lead users to believe it can :)
Just a note to say that this keeps happening. Thanks!
I tested this on mediawiki.org following a report on the English Wikipedia, but instead of getting an error VisualEditor just silently refused to save the page - the progress bar appeared for a typical amount of time then I was back to the save dialog as if I hadn't pressed save. Lather, rinse, repeat.
*** Bug 51534 has been marked as a duplicate of this bug. ***
e.g. https://www.mediawiki.org/wiki/Communication/hu?veaction=edit
*** Bug 51931 has been marked as a duplicate of this bug. ***
*** Bug 51805 has been marked as a duplicate of this bug. ***
Presumably there is a simple check we can do for whether the page is under the protection of the Translate extension, so we can do if ( … if <Translate extension installed> && !<page is Translate-protected> … ) { <do not load> } … in the code in ViewPageTarget init?
I assume VE checks whether the page is editable somewhere? I wonder if changing the hook in Translate from getUserPermissionsErrorsExpensive to getUserPermissionsErrors would solve this? Would have to make sure that the hook is efficient then.
I just VEdited a page on mw.org (Communication) and it seemed to work (beyond the translate tags showing up).
(In reply to comment #9) > I just VEdited a page on mw.org (Communication) and it seemed to work (beyond > the translate tags showing up). Nope, the error happens when you try to edit a translation, not the source page :) e.g. try to edit Communication/it
Change 119427 had a related patch set uploaded by Jforrester: Disable VisualEditor on Page Translation output pages https://gerrit.wikimedia.org/r/119427
Change 119427 merged by jenkins-bot: Disable VisualEditor on Page Translation output pages https://gerrit.wikimedia.org/r/119427