Problem/Motivation
I would like to have the option to default the "Create new revision" radio button to on.
Proposed resolution
Provide integration with the diff module.
In its current state, unless we provide a display mode config as part of the module (initially added then reverted), then the diff module might crash without the #3204468: Undefined index: full in Drupal\diff\Plugin\diff\Layout\VisualInlineDiffLayout->build() or #2452523: Offer a revisions tab for all entities patch
| Comment | File | Size | Author |
|---|
Issue fork sitewide_alert-3524811
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:
- 3524811-
changes, plain diff MR !76 /
changes, plain diff MR !110
- 3524811-create-new-revision
changes, plain diff MR !75
Comments
Comment #4
malcomio commentedHaving looked at the code, this doesn't seem to be configurable - work in progress in https://git.drupalcode.org/project/sitewide_alert/-/merge_requests/75
Comment #5
malcomio commentedComment #8
suryabhi commentedWith MR 76 changes User can able to see the revisions of sitewide alert. The one can revert and delete the revision. User can able to compare the revisions.
Comment #9
suryabhi commentedComment #10
malcomio commentedComment #12
smustgrave commentedThis appears to have pipeline issues.
Comment #14
codebymikey commentedPushed an update addressing the failing CI tests.
There's however a slight incompatibility with the diff module at the moment though where it throws a fatal error on D11 when doing a visual diff because there's no default view mode configured and the diff module code assumes there should be one.
I've added the default view mode configs into the MR (but no post update hook to install them yet as I'm still weighing options).
Ideally, the diff module should try and support entities with no view modes, then the module may be updated to target that version and up.
Current options:
1. Create view modes.
2. Add documentation that those making use of the diff module will need to add a patch so that it supports entities with no view mode.
edit: On further thought, for backwards compatibility purposes, a strict requirement on the diff module should not be required. It should only be used if the diff module is installed.
Comment #15
codebymikey commentedAttached a static patch of the latest MR that works for my use case.
Works well, but I'm sure it probably won't be merged until test cases have been created for it.
If someone else is willing to pick this up, then feel free to.
Comment #17
codebymikey commentedUpdated the PR to target 3.1.x instead. And attached static patch of the current MR.
Comment #18
codebymikey commented