Change the "Create new revision" check box—on both the node edit page and content type settings page—so it reads "Overwrite existing revision."

This task came out of the discussion for #282122: D7UX: "Save draft" and "Publish" buttons on node forms. The idea is to change Drupal's default assumption from "only create a new revision if I tell you to," to "always create a new revision unless I tell you not to." This small shift in perspective will not sacrifice any existing functionality (checking the box under workflow settings for a content type will make Drupal act as it currently does) and no changes to the database should be required. However, this change will improve the user experience by eliminating consistency issues when features like a "Save as Draft" button are implemented.

CommentFileSizeAuthor
#26 revisions.patch2.97 KBBarisW
#8 revisions.patch4.05 KBMrHaroldA
#2 revisions.patch3.18 KBBarisW
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BarisW’s picture

Assigned: Unassigned » BarisW
BarisW’s picture

Status: Active » Needs review
FileSize
3.18 KB

This should do the trick! :)

Status: Needs review » Needs work

The last submitted patch failed testing.

jstoller’s picture

Is this patch failing tests because of a bug in the patch, or because the tests are expecting this checkbox to work differently from how it does?

BarisW’s picture

I'm not sure, I am not familiar with the way Patch tests work. Check the patch yourself, I don't think I did some strange things in the patch. Most of the part was search and replace..

jstoller’s picture

Status: Needs work » Needs review

I'm more designer than programmer, but I had our web developer take a look at the patch and he thought it was pretty simple and straight forward. I'm changing the status back to "needs review" so we can hopefully get some more eyes on this.

seutje’s picture

subscribing

MrHaroldA’s picture

FileSize
4.05 KB

@jstoller: I've looked into a couple of test and they indeed fail because the behavior is changed. The patch should also fix those failing test cases if it's to be accepted into upstream.

In the meanwhile I've also added the changed revision strings in the node.js file to reflect the changes in the behavior.

Status: Needs review » Needs work

The last submitted patch failed testing.

BarisW’s picture

Assigned: BarisW » Unassigned
jstoller’s picture

Given the minor nature of this patch, the fact that it is only failing testing because the test itself must be updated to account for the patch, and the fact this is a usability update, do you think we can get this in during the current "code slush" period? Is anone willing to take this on? While the major feature updates I was hoping for may not make it in, this will at least help set the stage for some contrib modules to improve things.

EvanDonovan’s picture

Not sure if I like this. My organization's website has over 10 different types of content. We only use revisions on one of them (book content). The rest all overwrite by default. I would rather "opt in" to revisions than have to explicitly out out. I also think "overwrite existing revision" is somewhat confusing - at first, I didn't know what it meant.

Also, should this be marked as critical, now that #282122: D7UX: "Save draft" and "Publish" buttons on node forms is postponed to D8?

jstoller’s picture

I have no problem with the default state of the checkbox being checked, which means you still need to "opt in". Personally I don't think that's ideal, but if it will make the change more acceptable to the broader community then I'm all for it. And the wording of the checkbox is also negotiable. If anyone has a better way to phrase it, please make a suggestion. Right now I'm more concerned about the overall concept being implemented than I am about specific wording.

I think this is absolutely a critical update, despite #282122: D7UX: "Save draft" and "Publish" buttons on node forms not making it in. This will still remove a critical usability roadblock and permit further development of these features in contrib.

EvanDonovan’s picture

I guess I don't see as yet what the advantage of making all content types create new revisions by default would be. I've tried to read the explanations here & on the other related issues, but they make me a bit confused. Is there a way to summarize the benefit in one or two sentences?

jstoller’s picture

The "save as draft" issue provides a good example of the importance of this change. Many publication workflows require the ability to save new revisions in a draft state, without changing the currently published revision. Adding a [Save as Draft] button to the node edit form is a logical feature to implement for these use cases. The expected behavior of such a button is to create a new revision in the draft state. The problem is that there is this checkbox to "Create New Revision." If the button creates a new revision when the checkbox isn't checked we have a serious UI conflict, but requiring the user to check the box before pushing the button is a user experience disaster. If the button doesn't automatically create a new revision it will be performing counter to user expectations.

To solve this we change the wording of the checkbox to something like "Overwrite Current Revision." Checking this box is the equivalent to leaving the "Create New Revision" checkbox unchecked, and vise-versa, so there is no real change in functionality. However, it significantly improves the user experience. Now a feature like the [Save as Draft] button can work as expected. It will automatically create a new revision, unless the user takes the extra step of forcing Drupal to overwrite the current revision.

On the other hand, checking the box in the default settings for a content type will make Drupal act as it does now and prevent it from creating new revisions at all. And if the default setting for new content types was to check "Overwrite Current Revision," then Drupal would behave exactly as it does now out of the box. But at least it would make things a little better for those of us who need to implement more advanced workflows which make use of the revision system.

As you can see, this change has a good potential upside with no real downside. No one looses any functionality, but some users will gain an important improvement to the user experience. And while workflow functionality did not make it into D7 Core, this change will remove one of the roadblocks to its further development in Contrib. Dries and many others have given this approach their blessing, and the patch itself is already written. All that remains is to fix the automated tests so they expect this new behavior, allowing the patch to pass said tests.

alexanderpas’s picture

usability:
"Create new Revision" = something new get's created! and if I don't check this box, no new revision get's created but i edit the existing revision!
"Overwrite Current Revision." = which current revision? what happens when i don't enable it?

EvanDonovan’s picture

Thanks, jstoller - I understand why you are advocating for this change now (UI consistency). I think the proposed wording of "overwrite current revision" is confusing though.

BarisW’s picture

Maybe "Don't create a new version" would be more clear to the end-user?

soxofaan’s picture

Maybe "Don't create a new version" would be more clear to the end-user?

I disagree, negations in checkbox/radiobutton UI strings can be very confusing.
Also note that there are also cultural differences about how to handle double negations, so a toggle to switch on/off a negative action is a bit tricky.

jstoller’s picture

@alexanderpas:

"Create new Revision" = something new get's created! and if I don't check this box, no new revision get's created but i edit the existing revision!
"Overwrite Current Revision." = which current revision? what happens when i don't enable it?

I don't think "Create new Revision" makes any more sense than "Overwrite Current Revision" to people who aren't familiar with the revision system. Nor does it do any better at indicating what will happen if I don't check the box. If I'm not overwriting the revision I'm editing, then I must be creating a new revision. It's the only logical option. Just as overwriting the current revision is the only logical conclusion if I don't check "Create new Revision" now.

The big difference here is that "Create new Revision" does nothing to express the danger inherent in not checking that box. To me, this alone is reason enough to make this change. Editing a node without using revisions is a seriously destructive process and whatever we say should communicate that to the users. Once you hit save there's no turning back. As for what happens if you don't check "Overwrite Current Revision", that is less important, in my opinion. Letting people save new revisions is the safe choice. Look at Google Docs. They don't warn you that you are saving new revisions when you press save.

@soxofaan: I agree. The checkbox should say what it is going to do, rather than what it is not going to do.

How about "Overwrite Existing Content"?

jstoller’s picture

Issue tags: +workflow, +edit content, +draft, +editing

I hope the wording issue is not preventing anyone from moving forward on the rest of this patch. Changing a simple string can always happen later, but this patch needs to be committed by Oct. 15 or we'll still be talking about it a year from now.

RoboPhred’s picture

Issue tags: -workflow, -edit content, -draft, -editing

Why "overwrite", isn't that a bit too technical? "Override" could potentially be easier to translate (and in my opinion, sounds better). And for a not-technical-at-all (but a bit more ambiguous) word, go for "Replace".

Trying some on for size:

Overwrite current revision.
Overwrite existing content.

Override current revision.
Override existing content.

Replace current revision.
Replace existing content.

Another issue is "existing content" doesn't connect it to fact that its dealing with multiple revisions. If we assume someone has no experience with the revision system, or doesn't know it's use:

Overwrite existing content.  Whats that do?  What if I don't check it... If it's not overwriting the content, that must mean its creating new content.  But wait, I don't want new content, I want to update this current one.  Better check it, then.

Basically, using "Overwrite existing content" its too easily connected as being the opposite of "Create new content" (which is currently in use throughout the UI for creating new nodes), leading users to think that without this option selected, a new node will be created.

In this case, I think it's important that the check box states it is for revisions (of a current content), as content is strongly connected to node (and may replace it altogether, see #425478: Choose one: "content" or "node"). Trying to hide/abstract the concept of revisions brings two different concepts under the single word "content", which will lead to confusion. Content is nodes, revisions are different versions of a single node; this distinct separation should be kept at the UI level.

RoboPhred’s picture

Issue tags: +workflow, +edit content, +draft, +editing

Oopse, re-adding the tags that were trumped by my delayed post.

jstoller’s picture

@RoboPhred

"Override" is not really accurate in this context.

While I personally don't have a problem with "Overwrite", I am also happy with "Replace".

How about "Replace Existing Revision"?

EvanDonovan’s picture

I think "Replace Existing Revision" would work. That would highlight that changes would not be saved in the revision history.

BarisW’s picture

Status: Needs work » Needs review
FileSize
2.97 KB

I agree, Replace sounds better than Overwrite.
Attached a new patch with the text 'Replace existing revision'.

Would be great to have this in core!

Status: Needs review » Needs work

The last submitted patch failed testing.

jstoller’s picture

Issue tags: +Needs tests
jstoller’s picture

mcrittenden’s picture

Sub.

jstoller’s picture

Does anyone know how to fix the tests so we can get this baby committed? The clock is running!

jstoller’s picture

bump

jstoller’s picture

According to Dries' development schedule for D7, patches that address usability, string changes and UI changes will still be accepted until November 15. This patch seems to fit into that category, so I thought I'd plea once more for help fixing the tests and getting it committed. We're so close!

joachim’s picture

If we're going to change the revision system to be consistent with a new 'save as draft' button, the wouldn't the most consistent thing be three buttons, all equal?

[ Save this revision ] [ Save a new revision ] [ Save a draft ]

(And I'm wary of setting revisions on by default as long as our revision storage stores straight data rather than diffs, which AFAIK is what it does.)

jstoller’s picture

@joachim

Personally I would find those three buttons confusing, and they seem generally inconsistent with Drupal's UI. But I digress. The actual implementation of a "Save as Draft" button is being discussed elsewhere. I only brought it up here as an illustrative use-case demonstrating the need for this patch.

We're not proposing any changes to the revision system, or removal of the check-boxes. The patch being proposed here is basically a simple text change. It is intended to improve the user experience and allow for the further development of publication workflow capabilities in Drupal. I'll say it again, and I can't stress this enough, this patch doesn't in any way change the functionality of Drupal, or its revision system. It is purely a usability and user experience enhancement. Furthermore, implementing this change does not mean that revisions will be "on" by default. If the box is checked by default, which is fine by me, then Drupal will continue with its current default behavior of overwriting the old revision when a node is saved.

sun.core’s picture

Priority: Critical » Normal

errr, a critical string change? Are you serious?

joachim’s picture

If we care sufficiently about usability to pour hours of dev time in overlays, then yes, why not?

jstoller’s picture

I see no reason why a string change can't be critical. Ultimately though, I don't much care what we label this patch, as long as it gets implemented! :-)

In truth, these workflow issues are absolutely critical to me (and many others, I expect). My colleagues and I are spending countless hours trying to workaround Drupal's shortcomings in this area. Anything that might help make that easier would be a major boon. This is one of those things.

jackie.taferner’s picture

Why not leave the wording of the checkbox the same, but make it checked as a default?

So, it will still say "Create new revision", but by default it's checked and will always create the revision automatically. And if I like I can uncheck, knowing it will not create a revision.

---
Jackie T.
JT Website Design

jstoller’s picture

@jackie
The wording is the issue, not the default state. It's fine if the default state is to have "Replace Existing Revision" checked, thus keeping things the way they are now. But changing the wording like this helps avoid user experience inconsistencies when more advanced workflows are implemented. See my comment #15 above for one example.

EvanDonovan’s picture

Version: 7.x-dev » 8.x-dev

jstoller: Your explanation makes sense for sites with advanced workflows. But I don't think it will hold true for most D7 sites. Also, "Save as Draft" won't be in D7 anyway.

This could be done as a simple form_alter on the node edit form. Let me know if you need it, and I could figure out how.

Bumping to 8.x.

jstoller’s picture

Version: 8.x-dev » 7.x-dev

@EvanDonovan
I realize this change is only needed to support advanced workflows. However, since it has zero negative impact on simple workflows, why wouldn't we want to implement it? This change is all upside and no downside! Even if the upside is only for one segment of Drupal users, it is an important segment.

True, "save as draft" didn't make it in this time, but that's no reason not to go ahead and implement this patch.

  1. Implementing this will help with contrib development of content moderation modules, in the absence of a Core solution.
  2. We already have a patch (thank you BarisW) and are only waiting on an update to the automatic tests so they can recognize the changes made in the patch.
  3. There will be no negative impact resulting from this change.
  4. This is basically a simple text change that improves usability, and who doesn't want to improve usability.

For all of these reasons, I am bumping this back to D7 one more time and crossing my fingers that someone is willing to take up the task. It looks like content moderation is going to be a longer road than I had hoped, but why not take the first step!

EvanDonovan’s picture

jstoller: you'll have to convince the usability team of the value of this, since we are in string freeze (only critical strings change). I suggest finding them on IRC. I talked to Bojhan today and he didn't seem convinced.

I am not convinced either. I see it as the same sort of reason where modr8.module & workflow.module are not in core.

Bojhan’s picture

@jstoller Bare in mind that it is UI freeze, anything which is not critical should be postponed - even something as small as a text change. That set a side.

Your argument is that this is most definitely improving usability, obviously without any data behind me I do disagree with that notion. The whole idea of "Replace existing revision" is terribly confusing to the large majority, who does not mess with revisions at all and just only looks at them when something gone wrong.

It might seem like an easy win, but does replacing mean - removing the old? Does it mean creating a new one? Replace what existing revision - the latest? Even considering that, given the advanced-ness of this option - I do feel we are over stretching core, for something that is better handled in contrib.

So I am not saying, we shouldn't do this - but we should be very careful changing something that will be in the face of almost all our content editors. Unless we know its good, remember the amount of content editors is even larger then administrators.

BarisW’s picture

And what if we don't discuss the string at all and only change the default behavior? So check the checkbox 'Create new revision' by default, just like Wordpress does?

Bojhan’s picture

I would be more comfortable with that.

jstoller’s picture

I would be fine with that, but: a) there will be a revolt from the army of users who don't want to use revisions for most of their content (see #12 above), and b) that is a separate issue than what is being discussed here.

The basic thinking behind this issue is as follows:

  1. It would be good if support for content moderation and advanced publication workflows was improved in Drupal.
  2. Implementing some workflow features (like a save as draft button) creates interface inconsistencies.
  3. By changing the phrasing of this interface element from "only create a new revision if I tell you to," to "create a new revision unless I tell you not to," we can avoid such inconsistencies and thus improve usability.
  4. Because this is a change in perspective and not a change in features, it can be implemented without altering Drupal's default behavior.
  5. Even if the workflow features are still in contrib, implementing this can help improve the quality and usability of that area of contrib development and may pave the way for future core upgrades.

In my mind, the default setting of this check box is far less important than the phrasing of its label. There's been a fair amount of discussion in this thread about how the label should be worded, but I am happy to entertain more discussion on that matter. Here are a few options:

  • Replace existing revision
  • Replace existing revision with changes
  • Overwrite existing revision
  • Overwrite existing revision with changes
  • Save changes over existing revision
  • Replace current revision
  • Replace current revision with changes
  • Overwrite current revision
  • Overwrite current revision with changes
  • Save changes over current revision
  • Replace revision with changes
  • Overwrite revision with changes
  • Replace this revision
  • Overwrite this revision
  • Replace existing content
  • Overwrite existing content
  • Replace existing content with changes
  • Overwrite existing content with changes
  • Replace the existing revision
  • Overwrite the existing revision
  • Replace saved revision with these changes
  • Overwrite saved revision with these changes

Some of these had already been ruled out by others, but that doesn't mean they shouldn't be reexamined. If you have any other suggestions then please post them. Today my favorite is "Save changes over existing revision." I find it to be descriptive and at least as intuitive as "Create new revision."

jstoller’s picture

For what it's worth, I just polled my wife, who is not a developer, a designer, or a Drupal user. I asked, if she were using a content management system to edit a web page in an online form, and at the bottom of the form there was a check box labeled "Save changes over existing revision," what did she think would happen if she checked the box before pressing the save button. She said she thought it would overwrite what was already on the site with her changes. Then I asked her what she thought would happen if she didn't check the box. She said she thought the changes would save to some other holding place, like a draft.

For the sake of comparison, I asked her the same question again, but labeled the check box "Create new revision." This time she said she thought there must be a series of revisions and this would add another one. But then when I asked her what would happen if she didn't check the box, she thought it would keep the old content and her changes would be lost.

I realize this is just one data point, but it's interesting non the less.

EvanDonovan’s picture

One change I would support would be to turn this checkbox into a radio button and have options something like the following:

[ X ] Overwrite current revision

[ ] Create new revision

That way, it would make more sense for what jstoller wants to support, but would not be too confusing a shift from previous Drupal versions.

I don't think changing the default to "create new revision" is a good option, since it would be a shift from previous versions, and would add additional database records unless people remember to specifically turn it off in the content type settings.

jstoller’s picture

I've been thinking about this issue quite a bit and I think I'm ready to relent. Given the current system in place in D7, EvanDonovan's suggestion that we replace the checkbox with two radio buttons could definitely help usability. It makes the two choices available to users explicitly clear. That being said, I don't think it solves the problems presented by advanced workflows, which I was trying to tackle. However, I'm the first to admit that workflow is a complex beast. Perhaps we just need to expect that anyone building a workflow module will need to use hook_form_alter() to fix the problem for their specific workflow implementation. I know that for my own use, given the custom workflow we're setting up, there's no way I would ever let my users see this checkbox anyway.

For now I'd like to call attention to #218755: Support revisions in different states. That provides far more fundamental support for workflows and content moderation in Core. Once it is implemented, just about everything else, including "save as draft" buttons and this issue here, could likely be taken care of in contrib.

Les Lim’s picture

Version: 7.x-dev » 8.x-dev

Re-bumping to 8.x.

Pancho’s picture

Note: I just marked #368369: Change of Drupal node revision management (preserve instead of overwrite) a duplicate of this. As a task, we should consider backporting it to D7, if the UX improvement outdoes the side effects of a post-feature-freeze change.

jstoller’s picture

Status: Needs work » Closed (duplicate)

This issue is now superseded by #1776796: Provide a better UX for creating, editing & managing draft revisions., so I am marking at a duplicate. I would have no problem re-opening this as a D7 issue again, but I expect getting this sort of UI change into D7 would be an uphill battle at this point.

Pancho’s picture

Status: Closed (duplicate) » Needs work

Back to needs work, as this aspect isn't covered by #1776796: Provide a better UX for creating, editing & managing draft revisions..
Even though agreement has not yet been reached, the proposal in #50 looks promising. Agree that we don't want to change default behaviour. We just want to help the author take the right decision.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Berdir’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

No change here in many years and core has changed a lot with content moderation and so on, where often enough, revisions are always enabled.

The save as X button change has been implemented and undone again since this issue has been last updated.

Another attempt at closing it.