Install
Works with Drupal: ^11.3 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Updating from 1.0.0-alpha14
An in-place update: no schema, configuration or signature change, and no database update to run. Run drush cr straight after, so Drush finds the new audit_trail:retry-abandoned command.
If your code implements AuditTrailInterface or AuditTrailChainWriterInterface (a test double, for instance), it needs the new members: record() takes a bool $required = FALSE argument, AuditTrailInterface adds isRecording(string $channel): bool, and AuditTrailChainWriterInterface adds hasSigningSecret(): bool.
If you relied on in_transaction_write_mode: inline to abort your transaction when an entry could not be chained, it no longer does: a failed write is reported like any other. Pass required: TRUE to record() for the entries that must not go unrecorded.
Fixes worth naming
- Every login, logout and masquerade failed with a 500 while no signing secret was active, for example on a site with the modules enabled and no Key set up yet. An entry the module cannot record no longer fails the request that recorded it, whatever the cause (no secret, an unreadable Key, a held chain lock, a row or outbox entry the database refused). It is reported on the
audit_trailchannel instead: a warning when no secret is active, an error otherwise. An entity save is no longer rolled back because its outbox entry could not be staged. #3620436: Recipe fails because ui_icons_patterns is not installed - The status report no longer fails when an audit_trail table is missing: it shows one "Audit trail tables: Unreadable" error naming the database failure. #3620436: Recipe fails because ui_icons_patterns is not installed
- A chain write that failed after its transaction committed wrote the entry's transient context to the PHP error log, IP address and request URI included, where it outlived the transient-purge window. The report now names a database failure by its class, SQLSTATE and driver code, as the other write paths already did. #3620439: search_api_trusearch 1.0.6
New
- A caller can require that its entry is recorded:
record(..., required: TRUE)throwsChainWriteFailedExceptionwhen the entry cannot be recorded or no chain takes it, and inside a transaction always stages it in the durable outbox, so the work it describes goes with it.isRecording($channel)says beforehand whether a chain takes the channel and a secret can sign. See "Processes that must be audited" indocs/consumers.md. #3620437: Pin block component versions to active, as a hard-coded hash 500s every Canvas page on a Drupal CMS base drush audit_trail:retry-abandonedoffers again the outbox entries given up on after three failed attempts, once their cause is fixed. The status report points at it. #3620437: Pin block component versions to active, as a hard-coded hash 500s every Canvas page on a Drupal CMS base- The status report shows how long the oldest entry has waited in the outbox: a warning past one day, an error past one week.
docs/verification.mdhas a crontab recipe that mails these lines. #3620438: Pin block component versions to active, so a stale hash cannot 500 the Canvas pages - The entries listing filters by user name, with autocompletion, instead of by user ID. A user ID still works, which is how to reach a deleted account or anonymous (
0). #3620435: Say on the performance page that a kernel test cannot see cache work
Changed
- The settings page collapses the write-mode, long-value and URL-credential sections and moves them to the bottom. #3620434: ai 1.4.8
- The capped overdue-segment count on the status report is translated as a plural. #3620440: Enable translation for js text: "More"
Housekeeping
- The codebase metrics page is refreshed: 397 files and 61,738 lines of code.