Problem/Motivation
A common problem when using revision logs in Drupal is that content editors don't always fill them out. As a result, the revision history for Content is often full of blank logs, which is useless to content moderators and reviewers.
Proposed resolution
Provide sane, nicely formatted logs for revisions that have none. This is a big UX improvement for content editors and finally makes the history of revisionable content entities like nodes readable.
Remaining tasks
Review the patch.
@todo File an issue for Content Moderation - it looks like $entity->original
is always the default revision, but if you're using Content Moderation you're really editing the latest revision. This means that the default revision log provided by this patch will always be really long since it shows all changes between the default and latest.
@todo File an issue for the Pathauto contrib module - the path alias always appear changed when alias patterns are enabled.
User interface changes
None.
API changes
Entities that extend \Drupal\Core\Entity\RevisionableContentEntityBase
or \Drupal\Core\Entity\EditorialContentEntityBase
will now get default revision logs if none are provided.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-2881786-12-14.txt | 1.08 KB | samuel.mortenson |
#14 | core-default-revision-log-2881786-14.patch | 14.54 KB | samuel.mortenson |
Comments
Comment #3
Wim LeersYES PLEASE
Comment #4
dawehnerAre you sure there is no other issue out there? I remember reviewing it and asking, why is this not a special field item,
Comment #5
samuel.mortenson@dawehner #2696555: On the entity form of revisionable entities, make "create new revision" and "revision log" configurable is related, but I couldn't find anything else about creating a default revision log.
Comment #6
samuel.mortensonThis should fix some of the errors, but a lot of the other failures are REST related, testing that the serialized content of entities matches some exact hard-coded value. I'll let this fail before fixing those.
Comment #7
samuel.mortensonComment #8
samuel.mortensonComment #10
samuel.mortensonFixed some of the test errors, hopefully!
Comment #12
samuel.mortensonMissed the migrate test failures.
Comment #14
samuel.mortensonCoding standards...
Comment #16
samuel.mortensonSo one of the two recent failures is fairly explicit about expected behavior with empty log messages:
Before jumping in and I suppose removing this test method - should the default revision log behavior be configurable per bundle? It would make this patch a lot more complex, but I don't want to cause a regression in terms of functionality.