Closed Bug 1529021 Opened 5 years ago Closed 5 years ago

Can't delete remaining App center pages

Categories

(developer.mozilla.org Graveyard :: Wiki pages, enhancement, P1)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cmills, Assigned: jwhitlock)

Details

(Keywords: in-triage, Whiteboard: [specification][type:bug][points=2])

What did you do?

  1. Working on deleting the App Center (see https://github.com/mdn/sprints/issues/977 for tracking).
    2. I've deleted or moved every page and translation out of the App Center...
    3. Except for a few that won't delete:

What happened?

I have removed all their children and localizations, but the delete option will still not appear.

What should have happened?

The delete option should appear, allowing me to delete the pages.

Is there anything else we should know?

I am wondering if this is a problem because of the mess the App Center got in, with numerous translations no longer with the same location/URL structure as the original, etc. Although this did not seem to cause a problem in all the other cases.

Assignee: nobody → jwhitlock
Keywords: in-triage
Priority: -- → P1
Summary: Can't delete remaining App enter pages → Can't delete remaining App center pages
Whiteboard: [specification][type:bug] → [specification][type:bug][points=2]
Status: NEW → ASSIGNED

This was a mess.

Django 1.11 added a check to prevent deleting a record if there are related records. For example, you can't delete /en-US/docs/Web/Apps because /en-US/docs/Web/Apps/Tutorials has it as a "parent_topic" relation, and /fr/docs/Web/Apps/Tutorials has it as a "parent" relation. It forces you to delete the derived documents before you delete the parent document. This is configurable. We could instead make those cascading deletes, so that if you delete a "root" document, then branches are also deleted, but this would be hard deletes, not the "soft" delete we've used in the past. Better tree deletion was suggested in bug 972541, and considered too risky to implement. I think this is still the right choice.

Related records are easy to find if they are child documents (use the $children API) or translations (use the Languages dropdown). However, redirects are omitted from the $children API, and soft-deleted documents sometimes prevent deletion.

I went through several rounds of finding trees of documents, deleting the translations, deleting children, and purging soft-deleted documents. I eventually pruned the whole tree down to https://developer.mozilla.org/en-US/docs/Web/Apps, which I made a redirect to https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps

I accidentally deleted an Archive page, https://developer.mozilla.org/en-US/docs/Archive/Apps/Design/Planning/General_design_principles, but I was able to restore the revisions from staging.

I can imagine some code that would improve this process in the future, but I think moving content out of the wiki is a better use of limited development resources.

Status: ASSIGNED → RESOLVED
Closed: 5 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.