Now the rev log message by default is "edited by [user]"
That is not useful.
Could it be customizable?

For me, I just want it to be blank by default, as I am using "enforce rev log message" module to force user to leave a log message. But if I got some default text, user can save it without leave a message.

CommentFileSizeAuthor
#55 Issue-1233810-by-hass-Customizable-revision-log-mess.patch4.37 KBhass
#52 Issue-1233810-by-hass-Customizable-revision-log-mess.patch4.37 KBhass
#46 Issue-1233810-by-hass-Customizable-revision-log-mess.patch6.92 KBhass
#43 Testbot-suxxx.patch6.1 KBhass
#40 Test-bot-tries.patch6.07 KBhass
#36 Issue-1233810-by-hass-Customizable-revision-log-mess.patch6.92 KBhass
#33 Issue-1233810-by-hass-Customizable-revision-log-mess.patch7.3 KBhass
#29 Issue-1233810-by-hass-Customizable-revision-log-mess.patch7.3 KBhass
#26 Issue-1233810-by-hass-Customizable-revision-log-mess.patch5.73 KBhass
#23 Issue-1233810-by-hass-Customizable-revision-log-mess-7.x-1.x.patch4.43 KBhass
#19 workbench_moderation-default_revision_log_message-1233810-19-D7.patch2.94 KBtclark62
#17 workbench_moderation-default_revision_log_message-1233810-17-D7.patch2.92 KBtclark62
#15 workbench_moderation-default_revision_log_message-1233810-15-D7.patch2.92 KBkurtfoster
#8 workbench_moderation-default_revision_log_message-1233810.patch926 bytesdayofthedave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robeano’s picture

Assigned: Unassigned » robeano

I'll take this one.

robeano’s picture

We should provide a minimum length setting as well. See #1283814-2: Does Workbench support - Mandatory Revisions with Notes?.

HyperGlide’s picture

@robeano thanks for taking this!

Pls advise if need me to help test.

stevector’s picture

stevector’s picture

Version: 7.x-1.0-beta8 » 7.x-2.x-dev

I think this should be in any 2.x re-architecting.

I'm open to patches for 1.x that make this a setting. In 1.x I suppose it could be per-node-type and shoe horned onto the node type edit page. Or it could be global to all nodes under Workbench Moderation.

HyperGlide’s picture

hello -- any thoughts on how http://drupal.org/project/better_revisions would interface or work with WB-Moderation?

We are still struggling with the quality of revision notes from users.

dayofthedave’s picture

Not sure if this falls outside the scope of the feature request, but it would be nice if it could also include the functionality of the "enforce rev log message" module. I think most anyone who opts for a blank default message would also want to prevent blank messages from being submitted.

dayofthedave’s picture

This worked for me. Sorry if it's not a proper patch file. I've never submitted one before, so I'm not 100% sure if this is the right format.

HyperGlide’s picture

TechNikh’s picture

#8 worked for me

colan’s picture

Component: Miscellaneous » User interface
Issue summary: View changes
Status: Active » Needs work

#8 is a good place to start, but there should be an option to turn it off. Also, there's extra whitespace at the end of the last line (minor).

colan’s picture

Title: The default revision log message » Add option to force the user to enter a revision log message

Better title.

texas_tater’s picture

Hi Folks,

I'm having the same issue as Eric Yang, almost 4 years to the day of his original post here!

How can I REMOVE the default rev log message of "edited by [user]"? I'm desperate to begin using "enforce rev log message" module, but it's moot with a default message in there.

As for the "edited by user info", I'm using WB with Revisioning module (we use Diff to compare revisions), so I already have that info coming thru via Revisioning display.

So, not only is the "edited by [user]" default message taking up valuable space for more useful info, but it's duplicate info to boot.

ANY insights/guidance on how I can simply REMOVE that default text is GREATLY appreciated!

das-peter’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

I guess this has to go back to 1.x since 2.x doesn't have such a message anymore.

kurtfoster’s picture

Status: Needs work » Needs review
FileSize
2.92 KB

I've created a new patch and it's working well for me. It allows the user to select either update or create message or both in the admin form for the module. Then shows / hides the log message as appropriate.

tclark62’s picture

Status: Needs review » Needs work

For those of you who were unable to immediately locate where the options in patch #15 were added, they were added in Workbench Moderation > Advanced.

This works for me, however, for some reason the options are actually reversed. So that when "Auto Revision Log on Create" is unchecked and "Auto Revision Log on Update" is checked, nodes which are being updated no longer have an automatic revision message while newly created nodes do. This is also true of the opposite situation as well.

I don't understand why this is the case, but it's definitely happening. I've cleared all my caches, made sure there were no db updates, but to no avail. I tried deducing if there is an error in the patch, but the patch seems to be doing the correct things, but then again I also only briefly glanced at it.

Good work on providing these options, though, @kafmil.

tclark62’s picture

Found the problem. Two variables were swapped at a point I didn't see.

hass’s picture

Status: Needs review » Needs work
  1. +++ b/workbench_moderation.admin.inc
    @@ -358,6 +358,36 @@ function workbench_moderation_admin_check_role_form($form, &$form_state) {
    +    '#title' => t('Auto Revision Log on Create'),
    

    ucfirst only

  2. +++ b/workbench_moderation.admin.inc
    @@ -358,6 +358,36 @@ function workbench_moderation_admin_check_role_form($form, &$form_state) {
    +    '#description' => t('Automatically set the revision log message to Created by [username] when creating new nodes.'),
    

    How about adding some <em> (or double quotes) around the "Created by [username]".

  3. +++ b/workbench_moderation.admin.inc
    @@ -358,6 +358,36 @@ function workbench_moderation_admin_check_role_form($form, &$form_state) {
    +    '#title' => t('Auto Revision Log on Update'),
    

    ucfirst only

  4. +++ b/workbench_moderation.admin.inc
    @@ -358,6 +358,36 @@ function workbench_moderation_admin_check_role_form($form, &$form_state) {
    +    '#description' => t('Automatically set the revision log message to Edited by [username] when updating existing nodes.'),
    

    Same as before

  • Uninstall of variables is missing.
  • A revission message that is required would be extrem useful.
  • Maybe more flexible would be a revision template that can be customized with tokens. This means we have the flexibility to have an empty field and also a custom text. This may also remove the need for this TRUE/FALSE variable. This would also allow people to use [user:name] and [user:name-raw] token if Realname is used.
tclark62’s picture

Thanks for looking at this @hass.

I made the first four changes. Unfortunately, I'm not familiar enough with uninstalling variables to add that piece.

The second point you suggest (about requiring revisions) is accomplished by a module like Enforce Revision Log, so that seems out of the scope here. Why duplicate existing functionality? But maybe I didn't understand your point as you intended.

And again, my knowledge prohibits me from being able to speak to your third bullet point.

hass’s picture

https://www.drupal.org/project/enforce_revlog does not work with workbench moderation per project home. Never heard of this module yet... Just thought why i need an extra module for this simple feature. If i find some time I will try to look into the token stuff and update the code. Should be quite simple.

tclark62’s picture

Sounds great! Thanks again.

Just so you know, I'm pretty sure that, with this issue patched, EnfRevLog would work with Workbench Moderation. I say that because of what's detailed in this issue and because I'm actually using it in conjunction with Workbench Moderation and it works fine with this patch.

hass’s picture

Ah, ok. Now I understand the project home comment. I thought it is a real difficulty.

hass’s picture

Title: Add option to force the user to enter a revision log message » Customizable revision log message
Status: Needs work » Needs review
FileSize
4.43 KB

Here is a patch that works well here. It also applies to 7.x-3.x. Please RTBC.

Status: Needs review » Needs work

hass’s picture

Added token module for test bot.

Status: Needs review » Needs work

The last submitted patch, 26: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

The last submitted patch, 26: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

hass’s picture

Status: Needs review » Needs work

The last submitted patch, 29: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

The last submitted patch, 29: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

hass’s picture

Status: Needs review » Needs work

The last submitted patch, 33: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

The last submitted patch, 33: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

hass’s picture

Status: Needs review » Needs work

The last submitted patch, 36: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

The last submitted patch, 36: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

hass’s picture

Component: User interface » Code
Status: Needs work » Needs review

Tests run fine locally. No idea what the problem is.

hass’s picture

Status: Needs review » Needs work

The last submitted patch, 40: Test-bot-tries.patch, failed testing.

The last submitted patch, 40: Test-bot-tries.patch, failed testing.

hass’s picture

Status: Needs work » Needs review
FileSize
6.1 KB

Status: Needs review » Needs work

The last submitted patch, 43: Testbot-suxxx.patch, failed testing.

The last submitted patch, 43: Testbot-suxxx.patch, failed testing.

hass’s picture

Status: Needs review » Needs work

The last submitted patch, 46: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

The last submitted patch, 46: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

hass’s picture

Status: Needs work » Needs review
larowlan’s picture

I will contact the 7.x maintainer and ask if they have an objection to committing the token dependency to 7.x-2.x HEAD

hass’s picture

7.x-3.x

hass’s picture

Status: Needs review » Needs work

The last submitted patch, 52: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

The last submitted patch, 52: Issue-1233810-by-hass-Customizable-revision-log-mess.patch, failed testing.

hass’s picture

After some thinking... I missed that token_replace() is a core function and [user:name] always work in core. This patch makes token module just optional to enhance the UI.

Applies to 1.x and 3.x.

hass’s picture

larowlan’s picture

Do we need a test here - question for the 7x branch maintainer?
Other than that, looks good to me.

agentrickard’s picture

Looks good. I like the compromise of Token as a soft dependency.

hass’s picture

Status: Needs review » Reviewed & tested by the community

Sounds like a maintainers RTBC approval