Translated revisions have incorrect based_on revision


2 years ago
2 years ago


(Reporter: jwhitlock, Unassigned)






2 years ago
While investigating bug 1280957, I found that the based_on revision was incorrect, and referred to a revision of a different document. This will make the translation interface even worse (comparing revisions from different documents) and may block page moves. A quick survey of the code shows this was a problem in the past, and validation code is preventing the issue.

Investigation is needed to determine:
- How widespread the problem is in current documents
- If the problem can be associated with a recent change
- How to prevent it from happening in the future
- If needed, how to fix current revisions with this issue

Developer brain dump follows:

The document 79501 is for /zh-TW/docs/Web/Guide/Performance/Using_web_workers
The document  1849 is for /en-US/docs/Web/API/Web_Workers_API/Using_web_workers, the original document

The revision 1072612 is the current revision for document 79501 (zh-TW doc)
The revision 1048638 is the current revision for document 1849 (en-US doc)

Revision 1072612 claims to be based on revision 730801. This is a revision of document 131237, /en-US/docs/Web/Reference/API_clone.  This change was made a few days previously, on June 18th.

This was fixed by manually changed the based_on revision to 911951, an old version of document 1849.  A .update() on a query set was used, because there is code in the model save() method prevents setting this to anything but the most recent revision of the English document.

based_on is a hidden form field in the translation interface, so it could be set or cleared by the client. Form and model validation did not find this error.
Keywords: in-triage
You need to log in before you can comment on or make changes to this bug.