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

  1. Log in as an admin
  2. Visit /admin/config/user-interface/revision-extras
  3. Confirm that there are new configuration options for requiring revision log message on nodes, media, and blocks.
  4. Update the config to require log message on just page nodes without the add form option.
  5. Create a page. Save. Confirm that for adding a new page, the log message is NOT required.
  6. Edit the page. Confirm that for editing a page, log message IS required.
  7. Create an article. Save
  8. Edit the article. Confirm that for editing an article log message is NOT required.
  9. Update the config to require log message on page nodes with the additional checkbox for the add form
  10. Create a page. Save. Confirm that after the change, the log message IS required when adding a new page.
  11. 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.
  12. Go back to the configuration form and for the default message under the media section, select "Reference Parent"
  13. Make sure image is still required + on the media add form and save.
  14. 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)
  15. Edit an existing page with a previous log message to add an image in the new media reference field.
  16. 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])."'
  17. Enable content moderation on page nodes. (/admin/config/workflow/workflows/manage/editorial -> Under This workflow applies to/content types, choose basic page and save )
  18. Edit an existing page and save it as a draft revision
  19. When viewing the page you just edited, click on the 'latest version' tab.
  20. 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.
  21. Make sure basic block is still required + on the block add form and that page nodes still require log messages.
  22. Enable the layout builder module ( /admin/modules )
  23. Enable layout builder on page nodes ( /admin/structure/types/manage/page/display and check both boxes under layout options )
  24. Visit the layout tab of a page node. Confirm that the log message field appears and is required.
  25. Click "add block" => "create content block" => "Basic block"
  26. Confirm that no log message is required on the block
  27. Add content to the block and save.
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

jastraat created an issue. See original summary.

jastraat’s picture

Issue summary: View changes

jastraat’s picture

Issue summary: View changes
jastraat’s picture

Issue summary: View changes
jastraat’s picture

Issue summary: View changes
jastraat’s picture

Status: Active » Needs review
jasongose’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me!

Thank you for the awesome testing steps :)

  • jastraat committed c023f9bb on 1.0.x
    [#3553880] feat: Add option to require revisions and revision log...
jastraat’s picture

Status: Reviewed & tested by the community » Fixed

Thanks Jason!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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