Trash Bin & Safe Category Deletion

Deletions in Standalone Qwiki are reversible by default so accidental clicks never destroy published work or form responses.

Trash Bin modal showing soft-deleted documents and categories with restore and permanent purge controls

Soft-Deleting Chapters & Forms

When an admin deletes a document from the toolbar (or via api/publish.php delete_chapter without permanent=true):

  • The document file and metadata move safely into .htaccess-protected data/trash/ rather than being unlinked immediately.
  • For Interactive Forms (.form.json), the companion .submissions.json response file moves into Trash alongside the schema.

Safe Non-Empty Category Deletion

If you attempt to delete a category that still contains documents or nested folders, Standalone Qwiki halts and opens a confirmation modal offering two safe choices:

  1. Move category & contents to Trash: Soft-deletes the category tree and its chapters together into data/trash/.
  2. Move contents to another category first: Lets you relocate documents cleanly before removing the empty folder.

(Protected or locked categoriesβ€”and any parent category containing a locked itemβ€”cannot be deleted until locks are removed.)

Restoring or Permanently Purging Items

Open admin β–Ύ βž” πŸ—‘οΈ Trash Bin:

  • Restore: Performs a slug and path collision check before restoring the document (or category tree + form submissions) back into content/ and qwiki.json.
  • Delete Permanently / Empty Trash Permanently: Permanently deletes the trashed files along with any associated revision snapshots in data/revisions/.