Closed Bug 1034802 Opened 10 years ago Closed 7 years ago

[ISE] When translating a specific page to Spanish, saving it leads to an ISE.

Categories

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

All
Other
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fabricio.guzzo, Unassigned)

References

Details

(Whiteboard: [specification][type:bug][trace-wanted][LOE:2])

What did you do?
================
1. I select the article. URL (https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)
2. Click on icon Languages
3. I select "Add a Translation"
4. I started to translate the document.
5. Title in Español: Una re-introducción a JavaScript (Tutorial de JS)
6. Slug in Español: Una_re-introduccion_a_JavaScript
7. SAVE CHANGES.

What happened?
==============
The slug provided is not valid.
Internal Server Error
The system did not create the translation.


What should have happened?
==========================
Create translation "Spanish". 

Is there anything else we should know?
======================================
I confirm the error.

Note that a translation of this document already exists but is not linked to the English document: Una_re-introduccion_a_JavaScript (Kuma migration bug that I try to fix little by little).

Here the same: if I try to link it to the English document (by clicking edit and filling the form) I also get the ISE.

I guess there is a deleted document in Spanish linked behind the scene. Luke will be able to confirm (and fix it, so we can link the correct document).

Anyway, Fabrizio, thank you for your work. Since the last week of March, I'm solving little by little all these problems by linking existing translations in any language to their English pages. Overall I already went from 3422 (in May when I started to track the amount of affected pages) to 1301; and for Spanish from 580 to 149. Still a lot to go :-(, meaning such frustrating problems can happen :-( List of Spanish pages without parent: https://developer.mozilla.org/es/docs/without-parent
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(lcrouch)
Summary: Add a Translation "Spanish" → [ISE] When translating a specific page to s^Spanish, saving it leads to an ISE.
Summary: [ISE] When translating a specific page to s^Spanish, saving it leads to an ISE. → [ISE] When translating a specific page to Spanish, saving it leads to an ISE.
Severity: normal → major
Component: General → Localization
Whiteboard: [specification][type:bug] → [specification][type:bug][trace-wanted]
Blocks: 972541
I couldn't find a traceback for this. :(

:teoli - Yes, there's already a Spanish translation for the page. [1] It was deleted, but not purged. I purged it so you should be able to translate it now.

There are 934 deleted translations [2] that could potentially cause this issue again. We can manually fix these via the django admin interface by checking the document, and choosing "Permanently purge deleted documents".

I didn't want to purge them all because I don't know if we want to keep some of them.

As a longer-term fix, we should catch this error and return a meaningful error message. I'm leaving this bug open for that longer-term fix. LOE:2 

[1] https://developer.mozilla.org/admin/wiki/document/54395/
[2] https://developer.mozilla.org/admin/wiki/document/?deleted__exact=1&is_localizable__exact=0
Flags: needinfo?(lcrouch)
Whiteboard: [specification][type:bug][trace-wanted] → [specification][type:bug][trace-wanted][LOE:2]
If I understand well, each time we delete (not purge) a translation, it adds to the problem! I don't think that a better message is solving the problem.

I see the following solutions:
1. Sever the link to the parent when deleting a translation. Of course restoring the page will be problematic (we need to find the parents, and pray another translation has not been handled). Adding a new translation will work, though.
2. When a request for a recreation of a deleted translation is done, restore automatically the page and add the new translation as a new revision. This will regenerate older revisions that may be spam though (and have consequences on the author list of the page), but they won't be directly visible for the user.

I think 2 would solve the problem (for new deletions, but also for the older ones).

James, what do you think?
Flags: needinfo?(jbennett)
(In reply to Jean-Yves Perrier [:teoli] from comment #4)
> If I understand well, each time we delete (not purge) a translation, it adds
> to the problem! I don't think that a better message is solving the problem.

Well, the main problem seems to be that we delete things and then never purge them. The two-step process is meant to give a chance to undo an accidental wrong delete, not to just leave the deleted page in the DB forever. Figuring out a workflow that does not leave lots of deleted pages sitting in the DB for a long time is the real solution here, and I am tempted to add a periodic task that will purge any page that has been deleted for longer than a set period of time to enforce that :)

> I see the following solutions:
> 1. Sever the link to the parent when deleting a translation. Of course
> restoring the page will be problematic (we need to find the parents, and
> pray another translation has not been handled). Adding a new translation
> will work, though.
> 2. When a request for a recreation of a deleted translation is done, restore
> automatically the page and add the new translation as a new revision. This
> will regenerate older revisions that may be spam though (and have
> consequences on the author list of the page), but they won't be directly
> visible for the user.
> 
> I think 2 would solve the problem (for new deletions, but also for the older
> ones).

Automatically restoring is possible, but is not the ideal solution. See my the rest of this comment for what we really *should* be doing.
Flags: needinfo?(jbennett)
I think what's really needed here is support for notifying the writer that's trying to create a new page that there's a deleted page in that space, and ask them what to do about it: undelete and create a new revision or purge then create a new document at that path.

But we do also need to have a periodic task that deletes any pages that have been in the trash after, say, three months or so.

Do we have a way to see a list of all the pages that are in the trash (I know we don't call it the trash, but it's an easy way to refer to the set of deleted but unpurged pages)?
See Also: → 1287529
This particular Spanish page is fixed, and now has an out-of-date translation:

https://developer.mozilla.org/es/docs/Web/JavaScript/Una_re-introducción_a_JavaScript

I opened bug 1287529 for the problem of deleted pages interfering with translation a few months ago.  I've just discovered this bug, and rather than retitle it, I'm closing this and linking to the new bug.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.