Expand description
Page — the tenant-scoped cms_page row every page shares,
whatever its type: tree position (path, depth, parent_id),
slug and url_path, PageStatus lifecycle, SEO fields and the
page_type_id that selects its PageTypeHandler.
Type-specific fields live in the handler’s extension table.
Structs§
- Archive
Plan - A planned archive / unarchive of a selection and (optionally) its
subtree. Pure read output — the caller applies
to_flipinside its own transaction, then purgeschanged_urls. - Page
- The abstract page record. Each row points at a
cms_page_typeregistry row viapage_type_id; per-type extension data lives in a separate table authored by user code (multi-table inheritance). - Schedule
Sweep Result - Outcome of one
run_schedule_sweeptick.
Enums§
- Page
Status - Lifecycle state of a page. Stored as a short string column so it survives migrations cleanly and is grep-able in the DB.
Functions§
- alias_
hybrid - Merge an alias row with its source into the page the site actually serves.
- apply_
sweep_ effects went_live_effectsfor every page a sweep published, and the search removal for every page it took down.- plan_
archive - Plan an archive (
archive = true) or unarchive of the already-loadedselectedrows. - record_
sweep_ publishes - What a manual publish records that the sweep skipped (#945): a
“Published” page-log entry and the subscriber emails, for every page
the sweep took live. Emails use
mailer(a mailer and itsFrom:), else the process-wide one (crate::task_queue::default_mailer); without either only the log is written. - run_
schedule_ sweep - Flip the status of any page whose
go_live_athas passed (draft or scheduled → published) and any page whoseexpire_athas passed (published → expired — a terminal 404 takedown, no longer conflated with the serve-ablearchivedstate). Idempotent — running it twice in a row produces zero changes on the second call. - run_
schedule_ sweep_ and_ purge run_schedule_sweep+ a frontend-cache purge of every page whose visibility flipped this tick. A scheduled page going live (or an expired one going away) must evict its previously-cached 404/draft/live entry; the bare sweep can’t, since it has no cache context. The purge routes throughcrate::task_queue::purge_urls, so it’s queued + retried when a task sink is installed, inline otherwise.- run_
schedule_ sweep_ with_ mailer - Sweep with a mailer attached — adds a pre-publish reminder pass.
Every page with
status = scheduledandgo_live_atin (now, now + 1h] that hasn’t already received the reminder gets a notification to subscribers + the flag set so future ticks within the same window don’t duplicate. - went_
live_ effects - What must happen once a page has gone live, whichever path put it there: the search index learns about it and the host’s after-publish hooks run. An editor’s save, a bulk publish, a workflow finish and the schedule sweep each did their own subset — the sweep did neither, so a scheduled page never reached an external search index.