Closed Bug 796935 Opened 13 years ago Closed 5 years ago

set translation parent: Gracefully handle an attempt to set a duplicate relation

Categories

(developer.mozilla.org Graveyard :: Localization, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: groovecoder, Unassigned)

References

Details

(Whiteboard: [localization][triaged][LOE:3])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:18.0) Gecko/18.0 Firefox/18.0 Build ID: 20121001030603 Steps to reproduce: 1. Edit a localized page without a translation parent (e.g., https://developer.mozilla.org/fr/docs/HTML/Element$edit) 2. Find/select a translation parent that already has a translation child in the current locale (e.g., en-US/docs/HTML/Element) 3. Click Save Actual results: ISE Expected results: 1. Pages that already have a translation child in the current locale should not appear in the options for setting translation parent 2. Catch the IntegrityError and show a proper error message
Whiteboard: [localization]
Luke, is this something simple enough so that we can ask some contributors to help about it? If so, what info do they need to know to fix it?
Flags: needinfo?(lcrouch)
Whiteboard: [localization] → [localization][triaged]
This bug is pretty complicated, and rare. It would take as much time to explain this part of the code as make the fix in the staff dev team.
Flags: needinfo?(lcrouch)
Blocks: 1004433
Per bug 1004433, we should add code in this fix that will show both appropriate error messages: 1. "Web/CSS/Adjacent_sibling_selectors" already has a translation: /fr/CSS/Sélecteurs_d'enfants_adjacents or 2. "Web/CSS/Adjacent_sibling_selectors" has a *deleted* translation: /fr/CSS/Sélecteurs_d'enfants_adjacents
Depends on: 972533
Severity: normal → major
Whiteboard: [localization][triaged] → [localization][triaged][LOE:?]
needinfo :groovecoder for an estimate
Flags: needinfo?(lcrouch)
Based on the amount of time I took to re-orient to how the translation parents and page delete code interacts here, I think this would take 3 days to do: 1. Chase down all the data conditions that cause this 2. Write tests for each 3. Fix each test
Flags: needinfo?(lcrouch)
Whiteboard: [localization][triaged][LOE:?] → [localization][triaged][LOE:3]
This appeared again in bug 796935. A user was unable to create an Italian translation of a document, because there was already a deleted Italian translation of the document. They got an internal server error [1] instead of a friendlier form validation error. This can be fixed using the Django admin (either purging the deleted document or unsetting the translation parent), but discovery of the root cause is impossible for the end user. There's some long term solutions: 1. Purge the deleted document when a user saves a new translation 2. "Orphan" the deleted document when the user saves the new translation (break the link between the deleted document and the English document) 3. Treat the new edit as restoring the old document and adding a new revision 4. Forbid translation until an admin figures it out (which is what we're doing now, in an ugly way) 5. Rewrite deletion to avoid soft deletion, which is problematic [2] Given the current resources, I like option 4 for the short term, and 5 when resources allow. [1] https://sentry.prod.mozaws.net/operations/mdn-prod/issues/332754/ [2] http://rdingwall.com/2009/11/20/the-trouble-with-soft-delete/
The Italian translation bug is 1283933
See Also: → 1287529
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.