VisualEditor: Disable veaction=edit on translation pages, which are not editable directly
Closed, ResolvedPublic

Description

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 :)


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=48891
https://bugzilla.wikimedia.org/show_bug.cgi?id=61218

bzimport set Reference to bz50284.
gpaumier created this task.Via LegacyJun 27 2013, 1:09 PM
Elitre added a comment.Via ConduitJul 16 2013, 6:34 AM

Just a note to say that this keeps happening. Thanks!

Thryduulf added a comment.Via ConduitJul 16 2013, 7:36 PM

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.

Skalman added a comment.Via ConduitJul 17 2013, 2:30 PM

*** Bug 51534 has been marked as a duplicate of this bug. ***

jayvdb added a comment.Via ConduitJul 24 2013, 10:10 PM
  • Bug 51931 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitJul 26 2013, 3:56 PM
  • Bug 51805 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitJul 26 2013, 5:16 PM

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?

Nikerabbit added a comment.Via ConduitJul 27 2013, 4:35 PM

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.

Elitre added a comment.Via ConduitSep 27 2013, 10:32 AM

I just VEdited a page on mw.org (Communication) and it seemed to work (beyond the translate tags showing up).

gpaumier added a comment.Via ConduitOct 1 2013, 9:08 AM

(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

gerritbot added a comment.Via ConduitMar 19 2014, 12:52 AM

Change 119427 had a related patch set uploaded by Jforrester:
Disable VisualEditor on Page Translation output pages

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

gerritbot added a comment.Via ConduitMar 19 2014, 10:27 PM

Change 119427 merged by jenkins-bot:
Disable VisualEditor on Page Translation output pages

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.