Problem/Motivation

Since site settings are content entities, and content entities can be revisionable, it would be a good feature to add revisionability to the site settings entity.

This allows for a better audit trail to find out which user changed a particular setting at what time.

Proposed resolution

Add content entity revision support. Drupal 10 provides default UIs for content entity revisions.

Remaining tasks

* Update entity definition to define `revision_table`, `show_revision_ui` and `revision_metadata_keys` properties.
* Write site_settings.post_update.php logic to make the entity revisionable.
* Add revision UI - see https://www.drupal.org/node/3160443

User interface changes

* A new revisions tab will be available on the site settings entities.

API changes

none

Data model changes

Database will provide extra revision tables. Site setting entities being loaded will just be the latest revision, providing the same output as before.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

svendecabooter created an issue. See original summary.

svendecabooter’s picture

Issue summary: View changes
scott_euser’s picture

Sure, makes sense - definitely open to adding this if someone makes a merge request with test.

Thanks!

svendecabooter’s picture

Status: Active » Needs review

I created a MR to add this functionality + a basic test.
Seems tests are failing on something else... Is the 2.x branch supposed to pass all tests?

scott_euser’s picture

Status: Needs review » Fixed

Thanks very much, this is really solid! Gave it a few manual test runs as well after merging from 2.0.x to resolve conflicts and get the tests passing again (field UI changed recently, breaking the existing tests for that).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.