Closed jwhitlock closed 5 years ago
Django 1.11 added some checks for foreign key relations, and is preventing deleting Documents if:
parent_topic
relation). A redirect counts as a child document.parent
relation).Because Django doesn't know about soft-deletion, a purge is needed to remove soft-deleted documents. It is a bit like disassembling a block tower from the the top down, one at a time.
Here's a deeper dive into one, for future reference.
https://developer.mozilla.org/ja/docs/Web/Apps/Fundamentals shows no children at $children
, but it actually had four children and one grandchild:
I used "View in Admin" to find the Document ID (61379
), and then the Django shell to generate the list (Document.objects.get(id=61379).get_descendants()
).
For each page, I loaded the delete page by adding "$delete
" to the end of the URL, being careful not to load the redirects.
Django wouldn't allow me to delete https://developer.mozilla.org/ja/docs/Web/Apps/Fundamentals/Quickstart until I purged the document Quickstart/Design and Quickstart/Design/Concept_A_great_app. It is possible that just the grandchild page needed to be purged.
With those pages deleted, I was able to soft-delete https://developer.mozilla.org/ja/docs/Web/Apps/Fundamentals. My new theory is that the problem is un-purged descendants that are not redirects.
All the pages are deleted, with the exception of https://developer.mozilla.org/en-US/docs/Web/Apps, which I changed to a redirect to https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps
Thanks so much @jwhitlock. I really appreciate you figuring this stuff out and helping me to finish cleaning this up. I think redirecting Apps to the PWA page is fine.
User story
As a MDN reader, I want to complete the removal of the App Center, so that I don't see stale documentation.
This is follow-on work from task #977.
Acceptance criteria
Web/Apps
are deleted in all translationsTasks
Delete the following:
References