Skip to content

Audit trail · Premium

ChangeTrail

Change history, diffs and one-click restore for any backend record in October CMS 4.x.

October CMS 4.4+ PHP 8.2+ v1.0.0 Paid
ChangeTrail: Change history, diffs and one-click restore for any backend record in October CMS 4.x.

Overview

What ChangeTrail does

See who changed what and when on any backend record, compare it word by word, and put a field back with one click. Set up from the settings page, without editing a single model.

  • History tab on every tracked record, with a word-level diff
  • Restore one field or a whole change set, permission-gated and confirmed
  • Activity Log across all records, filtered by date, user, event and type
  • Zero-code setup: pick models and Tailor sections in Settings
  • Passwords, tokens, secrets and API keys are masked and never stored
  • Retention setting with a daily prune through the October scheduler
ChangeTrail's History tab on a product record: who changed each field, the diff, and Restore buttons
ChangeTrail's History tab on a product record: who changed each field, the diff, and Restore buttons.

Requirements

  • October CMS 4.4+
  • PHP 8.2+

Setup

  1. 1 Install the plugin. Its migration creates two tables: one row per save (change set) and one row per changed field.
  2. 2 Open Settings → System → ChangeTrail.
  3. 3 Under Tracked records, add each model or Tailor section to track. For each one you can set "Only these fields" (empty means every column) and "Never track these fields".
  4. 4 Under Retention & privacy, choose how long to keep history (default 365 days, 0 keeps it forever), add any extra field patterns to mask (for example internal_*), and decide whether command-line changes are logged (off by default, so seeders and imports don't flood the log).
  5. 5 Make sure the server runs October's scheduler (php artisan schedule:run every minute). Old history is pruned daily.

Permissions

  • amjadiqbal.changetrail.view: the History tab and the Activity Log.
  • amjadiqbal.changetrail.restore: the Restore buttons.
  • amjadiqbal.changetrail.settings: the settings page.

Restoring a change

Put back one field or a whole change set. Restore always asks for confirmation, warns you if the field has changed again since instead of silently overwriting it, saves through the model so validation and model events still run, and is logged as its own "Restored" entry.

How it works

  • Tracking attaches to the chosen classes from outside and listens to the create, update and delete model events. Your model classes are never changed.
  • The History tab is added to the update form of a tracked record for users with the view permission. You can also place it yourself with a form field of type changetrailhistory.
  • History is looked up by model type and record id together (and the Tailor section), so records of different types never mix.
  • Primary keys and timestamps are never tracked. Passwords, tokens, secrets, API keys and similar fields are always masked: their values are not stored and can't be restored.
  • No phantom changes: saving without edits logs nothing, and empty vs blank or 49 vs 49.00 never shows as a change.
  • Tailor drafts and version rows are skipped; publishing a new entry's first draft is logged as Created.
  • If writing to the log ever fails, the error goes to the system log and your save still goes through.

Limitations (v1)

  • Database columns only: relations, repeaters and file attachments are not compared yet.
  • Creates and deletes are logged (a delete keeps a snapshot of the last values), but only edits can be restored.
  • Changes made with raw queries that bypass the model (for example Db::table()->update()) can't be seen.
  • After saving a form, the History tab shows the new entry on the next page load.

Support

Questions before you buy, or help after: get in touch and you will get a first reply within 2 business days.

Custom October CMS development

Need ChangeTrail customised, or a plugin of your own?

Custom plugins, backend form widgets and Tailor setups, built and tested on a real October install. Tell me what you need and get a plan and a quote, free.

Need something built?

Free quote in 60 seconds