Docs: Recycle bin

Recycle bin

Deleted pages, posts, files, comments, forums, categories and trackers wait in one recycle bin; how to restore them, and converting a page to a post.

Since 1.21.0 deleting a page, a post, a media file, a comment, a forum, a category or a tracker moves it to one recycle bin instead of removing it. Nothing is gone at the click. A restore brings the item back under its old id and address.

Finding it #

  • The bin is at the foot of the panel menu, just above Ask Tilspire. It shows to anyone who may see at least one kind of item in it, and each person sees and restores only the kinds their role manages.
  • Each list (Pages, Posts, Media, Comments, Forums, Trackers) has a Deleted (n) link that opens the bin on that kind. The Comments Bin tab is replaced by that link.
  • A delete's confirmation names the bin and the number of days.
  • Forum topics, tracker items and tickets keep their own hide and Deleted filter and are not in the bin. Users, roles, menus, themes and redirects are not either.

How long things are kept #

The setting is Days to keep deleted items, 1 to 365, 30 by default. The update took the period from your old "empty trash after" setting when it was set (held to 1 to 365), and used 30 when it was off. You set it from the bin's own screen, with the Kept 30 days button in its header. The old Trash card in Settings ▸ System is gone. A daily job deletes for good everything past its keep period, in batches of 100 a pass; a job that fails on one item leaves it and logs it. A shorter period deletes older items at the next cleanup.

Permissions #

  • See the recycle bin and restore from it (only the kinds this role manages). The update gave it to every role that holds a permission for one of the kinds in the bin, and a fresh install's Moderator has it.
  • Delete from the recycle bin for good, and empty it, and Change how long deleted items are kept. The update gave these only to roles that can manage System settings.

What comes back #

  • A page returns with its menu links, translations, content lock and revision. Links whose menu is gone are skipped, links whose parent is gone go to the top, and the restore says how many. A page that was the home page gets that choice back, unless something else was chosen since or it returns as a draft.
  • A post returns with its translations, lock and revision, but not its reactions.
  • Media returns the file and its WebP copy.
  • A comment returns to the status it had.
  • A forum, category or link returns with its settings, its access rules per role, its per-forum options and role overrides and its own community rules, but without its watchers and scoped moderators.
  • A tracker returns with its types, statuses, fields, categories, milestones and access, but not its scoped staff permissions.

When a restore is refused #

The item stays in the bin with a reason when:

  • its address now belongs to something else (the message names it and links to it; give one of them another address first);
  • what it sat under is gone or too deep;
  • a lock above your role holds it;
  • a comment's page or post is gone;
  • what was kept is no longer whole, or, for a media file, the file is gone or a different file has taken the name.

A forum or category that still holds topics or forums, and a tracker that still holds items, cannot be deleted at all until they are moved; the refusal says what is inside.

What the update put in the bin #

Items deleted before the update were put into the bin by the update itself: approved but unrestored delete drafts from the Operator API, pages and posts that are gone but still have a revision to restore from, and every comment already in the old Comments Bin. What was deleted before the update and left nothing behind is not in the bin.

Mind the clock. The keep period for all of those counts from the update, not from the day they were deleted. A site that never emptied its trash (the old default was never) has everything that was in it deleted for good about one keep period after updating. Before 1.21.0 nothing ever emptied the Comments Bin. If you want to keep any of it, restore it, or raise the keep period up to 365 days, in the days after the update and before that time is up. A comment hidden by a ban is not in the bin and is never deleted by it.

Converting a page to a post, and back #

An editor can turn a page into a blog post, or a post into a page, with Convert to post or Convert to page in the editor's header (on a phone, in the row's menu). It needs manage pages and the Blog's post permission, and the Blog on. A dialog shows what moves, what is lost, and the old and new address before anything happens.

  • The new item is created, the original goes to the recycle bin, and the old address redirects to the new one with a 301.
  • Title, address, body, summary, image, author, created date, reactions switch, hidden flag and content lock carry over. A published item stays published and a draft stays a draft. A scheduled post becomes a draft page, because a page has no publish date.
  • Menu links, translations, reactions and comments move to the new item. Comments are hidden if the new item shows none, never left behind on the binned original.
  • What is lost is named in the dialog with its real values. Page to post loses layout fields the post does not have, "noindex", the cache time and the sort order. Post to page loses tags, category, publish date, extra post values the page's Layout lacks and the comment-closing days.

Undo. The "Converted." message offers Undo for a moment, and the converted item's editor shows "Converted from a page/post" with Undo while the original is still in the bin. Undo restores the original under its own id, turns the redirect round, puts menu links back and sends the copy to the bin as "Undone conversion", so edits made on the copy are never deleted outright. It needs the permissions of both kinds, but not permission to see the bin. It is refused if the bin refuses the restore (the address is taken, for instance) and when the new page is now the home page. A failed convert undoes itself, and the half-made copy goes to the bin as "Failed conversion"; if even that cannot finish, the copy is kept and a message says to check both items.

When it is refused. A page that has child pages (it names them; move them first), the page that is the site's home (choose another home first), an item locked above your role, an address another item holds or a reserved address, an item another person is changing right now, and any convert while the Comments module is off.

The Operator API, the importer and backups #

  • A credential's delete is still a draft a person approves, and approving it moves the item to the bin. The bin is read through its own resource, and an item comes back through a restore draft a person approves. A credential can never delete for good, empty the bin or change the keep period. It can propose a convert as a draft a person approves; there is no Undo for the API and no webhook event is sent. See Operator API.
  • The importer's Undo sends the pages and posts it removes to the bin, marked "Undone import"; see The importer.
  • The off-site archive carries the bin. The core backup in Settings does not.

Known quirks #

The Review queue's badge and the Assistant's digest count every pending bin restore of the reviewer's kinds, including some the reviewer may not read; they show a number and an age, never a title.