Skip to content

Versions & Audit ​

How versions are created ​

Saving the form that holds a document stores a snapshot as a new version; saves without changes are skipped. When a document has no versions yet, for example seeded or imported content, its first save also records the state it replaces, noted as "State before the first editor save". Restores, AI translate and AI draft, and imports, template applications and duplicates through the PHP API or REST API record versions too. AI versions are saved when the result is generated, before you apply it, and are noted as "(generated, not applied)".

The History drawer ​

History in the editor toolbar lists the versions of a saved record: action (save, restore, ai_translate, ai_draft, import, template_apply, duplicate), time, author, block count, note and a block-level diff against the current document. A block that moved counts as changed, so only a version equal to the current document, order included, reads identical to current.

Restore ​

Restoring writes the snapshot back and records the restore as a new version, so history is never rewritten. It also refreshes the media usage index behind the media manager's delete protection. On Static Pages (RainLab.Pages) the restored version is loaded into the editor and saved with the page.

Restore and pin need renick.content.restore_versions (Restore and pin content versions).

Pin ​

A pinned version is exempt from retention.

Retention ​

Each document keeps its 50 newest unpinned versions; older ones are removed when a new version is recorded. The weekly renick:content:prune-versions also deletes unpinned versions older than 180 days. Pinned versions are never pruned.

The Audit Log ​

Settings → Content → Audit Log lists every version of every document with action, author, record, field and site, filterable by action and date. It needs renick.content.access_audit. renick:content:reset-audit wipes it together with the version history, which shares its table.