Problem/Motivation
A site may want to require revisions + revision log messages for all content changes on some entity types.
e.g. Require Revision Log Message but for more entities.
Test Steps
- Log in as an admin
- Visit /admin/config/user-interface/revision-extras
- Confirm that there are new configuration options for requiring revision log message on nodes, media, and blocks.
- Update the config to require log message on just page nodes without the add form option.
- Create a page. Save. Confirm that for adding a new page, the log message is NOT required.
- Edit the page. Confirm that for editing a page, log message IS required.
- Create an article. Save
- Edit the article. Confirm that for editing an article log message is NOT required.
- Update the config to require log message on page nodes with the additional checkbox for the add form
- Create a page. Save. Confirm that after the change, the log message IS required when adding a new page.
- Repeat for media (/media/add/image) and blocks (/block/add/basic) For each, test creating and editing without log message required on that type, then with just on edit, then with the add option as well.
- Go back to the configuration form and for the default message under the media section, select "Reference Parent"
- Make sure image is still required + on the media add form and save.
- Add a media field to the page type that references image media (/admin/structure/types/manage/page/fields -> "Media" -> pick "image" in the media types)
- Edit an existing page with a previous log message to add an image in the new media reference field.
- Confirm that after uploading an image in the field, the log message field appears as a required field and that the log message defaults to "Added via the media library form in "[parent title]" (ID: [parent ID])."'
- Enable content moderation on page nodes. (/admin/config/workflow/workflows/manage/editorial -> Under This workflow applies to/content types, choose basic page and save )
- Edit an existing page and save it as a draft revision
- When viewing the page you just edited, click on the 'latest version' tab.
- In the moderation form (where you can publish), confirm that the log message is required and that the last revision log message is pre-populated as the default.
- Make sure basic block is still required + on the block add form and that page nodes still require log messages.
- Enable the layout builder module ( /admin/modules )
- Enable layout builder on page nodes ( /admin/structure/types/manage/page/display and check both boxes under layout options )
- Visit the layout tab of a page node. Confirm that the log message field appears and is required.
- Click "add block" => "create content block" => "Basic block"
- Confirm that no log message is required on the block
- Add content to the block and save.
Issue fork revision_extras-3553880
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
Comment #2
jastraat commentedComment #4
jastraat commentedComment #5
jastraat commentedComment #6
jastraat commentedComment #7
jastraat commentedComment #8
jasongose commentedThis looks good to me!
Thank you for the awesome testing steps :)
Comment #10
jastraat commentedThanks Jason!